0
0
mirror of https://github.com/postfixadmin/postfixadmin.git synced 2024-09-20 03:36:20 +02:00

Done is_mailbox_alias todo. Now it checks against the database.

git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@932 a1433add-5e2c-0410-b055-b7f2511e0802
This commit is contained in:
Valkum 2011-01-01 04:07:39 +00:00
parent 4a2b40e100
commit 0ca6c9f239

View File

@ -64,12 +64,23 @@ class AliasHandler {
*/
public function is_mailbox_alias($address) {
global $CONF;
$table_mailbox = table_by_key('mailbox');
$sql = "SELECT * FROM $table_mailbox WHERE username='$address'";
$result = db_query($sql);
if($result['rows'] != 1) {
return false;
} else {
return true;
}
/*
$username = $this->username;
if($address == $username) {
# TODO: check (via SQL query) if there is really a mailbox with this address
return true;
}
return false;
*/
}
/**