浏览代码

User load not by 'email', but by 'email_normal'

Visman 5 年之前
父节点
当前提交
d25497f7ce
共有 1 个文件被更改,包括 1 次插入4 次删除
  1. 1 4
      app/Models/User/Load.php

+ 1 - 4
app/Models/User/Load.php

@@ -25,10 +25,7 @@ class Load extends Action
             if ('' != $value->username) {
                 $where = 'u.username=?s:field';
                 $value = $value->username;
-            } elseif ('' != $value->email) {
-                $where = 'u.email=?s:field';
-                $value = $value->email;
-            } elseif ('' != $value->email_normal) {
+            } elseif ('' != $value->email && '' != $value->email_normal) {
                 $where = 'u.email_normal=?s:field';
                 $value = $value->email_normal;
             } else {