/** * Checks if the user is banned/inactive/suspended. * * @param Phalcon\UserPlugin\Models\User\User $user */ public function checkUserFlags($user) { if ($user->getStatus() === User::STATUS_INACTIVE) { throw new Exception('The user is inactive'); } if ($user->getStatus() === User::STATUS_BANNED) { throw new Exception('The user is banned'); } if ($user->getStatus() === User::STATUS_SUSPENDED) { throw new Exception('The user is suspended'); } }