无修改
This commit is contained in:
@@ -14,8 +14,8 @@ class AuthService
|
||||
public function login(string $username, string $password)
|
||||
{
|
||||
$user = User::with(['company'])
|
||||
->where('username', $username)
|
||||
->find();
|
||||
->where('username', $username)
|
||||
->find();
|
||||
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ class AuthService
|
||||
|
||||
|
||||
$userInfo = [
|
||||
'id' => $user['id'], // 用户ID
|
||||
'company_name' => $user['company']['company_name'], // 所属公司名称
|
||||
'username' => $user['username'],
|
||||
'role' => $user['role'],
|
||||
@@ -37,6 +38,5 @@ class AuthService
|
||||
Session::set('user_info', $user);
|
||||
|
||||
return $userInfo;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user