Files
fdesk/app/common/logic/UserLogic.php
T
2025-07-11 18:01:23 +08:00

27 lines
484 B
PHP

<?php
namespace app\common\logic;
use app\common\model\User;
use support\exception\BusinessException;
class UserLogic
{
/**
* 用户信息
*/
public function userInfo(int $uid)
{
$user = User::find($uid);
if (!$user) {
throw new BusinessException('账户不存在', 404);
}
if ($user->status != 1) {
throw new BusinessException('账号已禁用', 403);
}
return $user;
}
}