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