Update AuthLogin listener

This commit is contained in:
Daniel Supernault 2018-12-24 22:42:15 -07:00
parent 44cac7c1df
commit cfacadc769
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -61,5 +61,30 @@ class AuthLogin
CreateAvatar::dispatch($profile);
});
}
if($user->status != null) {
$profile = $user->profile;
switch ($user->status) {
case 'disabled':
$profile->status = null;
$user->status = null;
$profile->save();
$user->save();
break;
case 'delete':
$profile->status = null;
$profile->delete_after = null;
$user->status = null;
$user->delete_after = null;
$profile->save();
$user->save();
break;
default:
# code...
break;
}
}
}
}