浏览代码

#528 .software domains in email aren't accepted during login

Alex Trofimov 9 年之前
父节点
当前提交
5d590004dc
共有 1 个文件被更改,包括 2 次插入 和 1 次删除
  1. 2 1
      inc/classes/BxDolAccount.php

+ 2 - 1
inc/classes/BxDolAccount.php

@@ -247,7 +247,8 @@ class BxDolAccount extends BxDolFactory implements iBxDolSingleton
     {
     {
         $oQuery = BxDolAccountQuery::getInstance();
         $oQuery = BxDolAccountQuery::getInstance();
 
 
-        if (preg_match("/^[_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,4}$/i", $s)) {
+        bx_import('BxDolForm');
+        if (BxDolFormCheckerHelper::checkEmail($s)) {
             $iId = (int)$oQuery->getIdByEmail($s);
             $iId = (int)$oQuery->getIdByEmail($s);
             return $iId ? $iId : false;
             return $iId ? $iId : false;
         }
         }