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
pull/2/head
Valkum 15 years ago
parent 4a2b40e100
commit 0ca6c9f239

@ -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;
*/
}
/**

Loading…
Cancel
Save