diff --git a/lib/private/mail.php b/lib/private/mail.php index f691fda979..79f5160963 100644 --- a/lib/private/mail.php +++ b/lib/private/mail.php @@ -125,7 +125,7 @@ class OC_Mail { * @param string $emailAddress a given email address to be validated * @return bool */ - public static function ValidateAddress($emailAddress) { + public static function validateAddress($emailAddress) { $emailAddress = self::buildAsciiEmail($emailAddress); return PHPMailer::ValidateAddress($emailAddress); } diff --git a/lib/public/util.php b/lib/public/util.php index 5cc7f0f467..f02213f244 100644 --- a/lib/public/util.php +++ b/lib/public/util.php @@ -266,7 +266,7 @@ class Util { $host_name = \OC_Config::getValue('mail_domain', $host_name); $defaultEmailAddress = $user_part.'@'.$host_name; - if (\OC_Mail::ValidateAddress($defaultEmailAddress)) { + if (\OC_Mail::validateAddress($defaultEmailAddress)) { return $defaultEmailAddress; } diff --git a/settings/ajax/lostpassword.php b/settings/ajax/lostpassword.php index b5f47bbcea..88c2bee614 100644 --- a/settings/ajax/lostpassword.php +++ b/settings/ajax/lostpassword.php @@ -6,7 +6,7 @@ OCP\JSON::callCheck(); $l=OC_L10N::get('core'); // Get data -if( isset( $_POST['email'] ) && filter_var( $_POST['email'], FILTER_VALIDATE_EMAIL) ) { +if( isset( $_POST['email'] ) && OC_Mail::validateAddress($_POST['email']) ) { $email=trim($_POST['email']); OC_Preferences::setValue(OC_User::getUser(), 'settings', 'email', $email); OC_JSON::success(array("data" => array( "message" => $l->t("Email saved") )));