1
0
mirror of https://github.com/postfixadmin/postfixadmin.git synced 2025-07-29 22:41:11 +03:00

functions.inc.php:

- check_domain(), check_email(): instead of calling flash_error(),
  return string with error message - or empty string if everything is ok

model/AdminHandler.php, model/AliasHandler.php,
model/DomainHandler.php, model/MailboxHandler.php,
sendmail.php, users/edit-alias.php:
- adopt to changed check_domain() and check_email() return value


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1451 a1433add-5e2c-0410-b055-b7f2511e0802
This commit is contained in:
Christian Boltz
2013-04-01 21:22:30 +00:00
parent c64768727d
commit 871bcbbe2f
7 changed files with 50 additions and 37 deletions

View File

@ -4,12 +4,13 @@
class AdminHandler extends PFAHandler {
protected function validate_new_id() {
$valid = check_email($this->id);
$email_check = check_email($this->id);
if ($valid) {
if ($email_check == '') {
return true;
} else {
$this->errormsg[$this->id_field] = Lang::read('pAdminCreate_admin_username_text_error1'); # TODO: half of the errormsg is currently delivered via flash_error() in check_email / check_domain
$this->errormsg[] = $email_check;
$this->errormsg[$this->id_field] = Lang::read('pAdminCreate_admin_username_text_error1');
return false;
}
}