优化用户注册逻辑

Signed-off-by: vilson <545522390@qq.com>
This commit is contained in:
vilson 2019-06-24 19:27:24 +08:00
parent 040620ed10
commit a807eee1ec

View File

@ -68,6 +68,12 @@ class Member extends CommonModel
unset($memberData['mobile']);
}
}
if (isset($memberData['email']) && $memberData['email']) {
$has = self::where(['email' => $memberData['email']])->find();
if ($has) {
unset($memberData['email']);
}
}
$result = self::create($memberData);