mirror of
https://gitee.com/koogua/course-tencent-cloud.git
synced 2025-07-15 21:02:20 +08:00
完善shallowUserInfo处理逻辑
This commit is contained in:
parent
d94001a4a4
commit
93279a53e2
@ -29,10 +29,14 @@ trait UserTrait
|
||||
|
||||
public function handleShallowUserInfo($id)
|
||||
{
|
||||
if (empty($id)) return new \stdClass();
|
||||
|
||||
$userRepo = new UserRepo();
|
||||
|
||||
$user = $userRepo->findShallowUserById($id);
|
||||
|
||||
if (!$user) return new \stdClass();
|
||||
|
||||
$result = $user->toArray();
|
||||
|
||||
$result['avatar'] = kg_cos_user_avatar_url($user->avatar);
|
||||
|
Loading…
x
Reference in New Issue
Block a user