feature: user list
This commit is contained in:
@@ -20,7 +20,7 @@ class AuthService implements AuthServiceInterface
|
||||
// Log the user in manually
|
||||
Auth::login($user);
|
||||
$request->session()->regenerate();
|
||||
if ($user->status != User::STATUS_ACTIVE) {
|
||||
if ($user->status != config('constants.STATUS_ACTIVE')) {
|
||||
Auth::logout();
|
||||
return ['success' => false, 'error_key' => 'permission', 'error_msg' => 'Bạn không có quyền truy cập. Vui lòng liên hệ quản trị viên'];
|
||||
}
|
||||
@@ -37,11 +37,11 @@ class AuthService implements AuthServiceInterface
|
||||
|
||||
public function getRedirectRouteForUser(User $user): string
|
||||
{
|
||||
if ($user->role == User::ROLE_ADMIN) {
|
||||
if ($user->role == config('constants.ROLE_ADMIN')) {
|
||||
return route('admin.dashboard');
|
||||
}
|
||||
|
||||
if ($user->first_login == User::FIRST_LOGIN_TRUE) {
|
||||
if ($user->first_login == config('constants.FIRST_LOGIN_TRUE')) {
|
||||
return route('user.change_password');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user