feature: remove change password for admin
This commit is contained in:
@@ -92,7 +92,7 @@ class AdminService implements AdminServiceInterface
|
||||
'status' => User::STATUS_ACTIVE,
|
||||
'card' => 0,
|
||||
'flag_send' => User::FLAG_SEND_DISABLED,
|
||||
'first_login' => User::FIRST_LOGIN_TRUE,
|
||||
'first_login' => $data['role'] == User::ROLE_ADMIN ? User::FIRST_LOGIN_FALSE : User::FIRST_LOGIN_TRUE,
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@@ -37,14 +37,14 @@ class AuthService implements AuthServiceInterface
|
||||
|
||||
public function getRedirectRouteForUser(User $user): string
|
||||
{
|
||||
if ($user->first_login == User::FIRST_LOGIN_TRUE) {
|
||||
return route('user.change_password');
|
||||
}
|
||||
|
||||
if ($user->role == User::ROLE_ADMIN) {
|
||||
return route('admin.dashboard');
|
||||
}
|
||||
|
||||
if ($user->first_login == User::FIRST_LOGIN_TRUE) {
|
||||
return route('user.change_password');
|
||||
}
|
||||
|
||||
return route('user.dashboard');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user