添加编号找到用户功能
This commit is contained in:
parent
2123c650e0
commit
3cf9b8f09a
@ -691,10 +691,8 @@ class UserLogic extends Logic
|
||||
public static function searchSn($post)
|
||||
{
|
||||
if ($post['keyword']) {
|
||||
$result = User::where(['sn' => $post['keyword'], 'del' => 0])->field('id, nickname, avatar as abs_avatar')->find()->toArray();
|
||||
if ($result) {
|
||||
return $result;
|
||||
}
|
||||
$userInfo = User::where(['sn' => $post['keyword'], 'del' => 0])->field('id, nickname, avatar as abs_avatar')->find();
|
||||
return $userInfo ? $userInfo->toArray() : [];
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user