Allow on-leave user to login; show alert message and ensure status is updated #719

This commit is contained in:
Nabeel Shahzad
2020-05-23 07:18:28 -04:00
parent 5f8053226e
commit f17cd15b01
4 changed files with 53 additions and 2 deletions

View File

@@ -109,8 +109,7 @@ class LoginController extends Controller
$user->last_ip = $request->ip();
$user->save();
// TODO: How to handle ON_LEAVE?
if ($user->state !== UserState::ACTIVE) {
if ($user->state !== UserState::ACTIVE && $user->state !== UserState::ON_LEAVE) {
Log::info('Trying to login '.$user->ident.', state '
.UserState::label($user->state));