Example #1
0
 /**
  * Checks if the user is banned/inactive
  *
  * @param Webird\Models\Users $user
  */
 public function checkUserFlags(Users $user)
 {
     if ($user->isDeleted()) {
         throw new AuthDeletedUserException('The user is disabled');
     }
     if ($user->isBanned()) {
         throw new AuthBannedUserException('The user is disabled');
     }
     if (!$user->isActive()) {
         throw new AuthInactiveUserException('The user is inactive');
     }
 }