$tmp=$app->db->queryOneRecord("SELECT count(database_user_id) as number FROM web_database_user WHERE database_user = '".$app->db->quote($mysql_db_user)."'");
if($tmp['number']==0)break;
}
...
...
@@ -293,13 +293,13 @@ class ApsGUIController extends ApsBase
$this->server->fault('permission_denied','You do not have the permissions to access this function.');
returnfalse;
}
//* Check if there is no active mailbox with this address
$tmp=$app->db->queryOneRecord("SELECT count(mailuser_id) as number FROM mail_user WHERE postfix = 'y' AND email = '".$app->db->quote($params["source"])."'");
if($tmp['number']>0){
$this->server->fault('duplicate','There is already a mailbox with this email address.');
$this->server->fault('permission_denied','You do not have the permissions to access this function.');
returnfalse;
}
//* Check if there is no active mailbox with this address
$tmp=$app->db->queryOneRecord("SELECT count(mailuser_id) as number FROM mail_user WHERE postfix = 'y' AND email = '".$app->db->quote($params["source"])."'");
if($tmp['number']>0){
$this->server->fault('duplicate','There is already a mailbox with this email address.');
$records=$app->db->queryAllRecords("SELECT DISTINCT server_id FROM web_database WHERE database_user_id = '".$app->functions->intval($primary_id)."' UNION SELECT DISTINCT server_id FROM web_database WHERE database_ro_user_id = '".$app->functions->intval($primary_id)."'");
if(isset($record['_ispconfig_pw_crypted']))$new_record['_ispconfig_pw_crypted']=$record['_ispconfig_pw_crypted'];// this one is not in form definitions!
$parent_domain=$app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ".$domain['parent_domain_id']);
}
}
// check if domain has alias/subdomains - if we move a web to another IP, make sure alias/subdomains are checked as well
$aliassubdomains=$app->db->queryAllRecords("SELECT * FROM web_domain WHERE parent_domain_id = ".$app->functions->intval($primary_id)." AND (type = 'alias' OR type = 'subdomain')");