Services\UserManager::isBanned PHP Method

isBanned() public method

Check whether an user is banned or not
public isBanned ( $id ) : boolean
$id
return boolean
    public function isBanned($id)
    {
        $throttle = Sentry::findThrottlerByUserId($id);
        if ($throttle->isBanned()) {
            // User is Banned
            return true;
        } else {
            // User is not Banned
            return false;
        }
    }