diff options
Diffstat (limited to 'settings/controller')
-rw-r--r-- | settings/controller/userscontroller.php | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/settings/controller/userscontroller.php b/settings/controller/userscontroller.php index 507e57ef940..11afe514016 100644 --- a/settings/controller/userscontroller.php +++ b/settings/controller/userscontroller.php @@ -263,8 +263,7 @@ class UsersController extends Controller { * @return DataResponse */ public function create($username, $password, array $groups=array(), $email='') { - - if($email !== '' && !\OCP\Mail\Util::validateMailAddress($email)) { + if($email !== '' && !$this->mailer->validateMailAddress($email)) { return new DataResponse( array( 'message' => (string)$this->l10n->t('Invalid mail address') @@ -443,7 +442,7 @@ class UsersController extends Controller { ); } - if($mailAddress !== '' && ! \OCP\Mail\Util::validateMailAddress($mailAddress)) { + if($mailAddress !== '' && !$this->mailer->validateMailAddress($mailAddress)) { return new DataResponse( array( 'status' => 'error', |