Check user throttle status.

@return bool
@throws \Cartalyst\Sentry\Throttling\UserBannedException
@throws \Cartalyst\Sentry\Throttling\UserSuspendedException
489362
public function check()
	{
		if ($this->isBanned())
		{
			throw new UserBannedException(sprintf(
				'User [%s] has been banned.',
				$this->getUser()->getLogin()
			));
		}

		if ($this->isSuspended())
		{
			throw new UserSuspendedException(sprintf(
				'User [%s] has been suspended.',
				$this->getUser()->getLogin()
			));
		}

		return true;
	}
872966
public function checkIfReady()
    {
        if (!$this->attrs->paramsDone || !$this->attrs->inputDone) {
            return false;
        }
        if (isset($this->appInstance->passphrase)) {
            if (!isset($this->attrs->server['PASSPHRASE'])
                || ($this->appInstance->passphrase !== $this->attrs->server['PASSPHRASE'])
            ) {
                $this->finish();
            }

            return false;
        }

        if ($this->attrs->input->isFrozen()) {
            return false;
        }

        if ($this->sleepTime === 0) {
            $this->wakeup();
        }

        return true;
    }
920147
public function isEnabled()
    {
        return ($c = $this->enabledAttribute) !== null
            ? (boolean) $this->owner->$c
            : (($c = $this->disabledAttribute) !== null ? (boolean) !$this->owner->$c : null);
    }
603904
public function isActive(): bool
    {
        if (is_callable($activeWhen = $this->activeWhen)) {
            return call_user_func($activeWhen);
        }

        if ($this->route) {
            return $this->hasActiveStateFromRoute();
        }

        return $this->hasActiveStateFromUrl();
    }
1185262
public function isNewsSubscribed()
    {
        if ($this->_blNewsSubscribed === null) {
            if (($isSubscribedToNews = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('blnewssubscribed')) === null) {
                $isSubscribedToNews = false;
            }
            if (($user = $this->getUser())) {
                $isSubscribedToNews = $user->getNewsSubscription()->getOptInStatus();
            }
            $this->_blNewsSubscribed = $isSubscribedToNews;
        }

        if (is_null($this->_blNewsSubscribed)) {
            $this->_blNewsSubscribed = false;
        }

        return $this->_blNewsSubscribed;
    }
1089947
public function checkRegistryRequestsAnswers()
    {
        if (! (($this->db instanceof \Zend_Db_Adapter_Abstract) && ($this->session instanceof \Zend_Session_Namespace))) {
            return false;
        }

        // Checks if this is the current user
        if (! $this->_vars instanceof \Zend_Session_Namespace) {
            $sessionStore = $this->session;

            $notCurrent = true;
            foreach (array('user_id', 'user_organization_id') as $key) {
                if ($sessionStore->__isset($key) && $this->_vars->offsetExists($key)) {
                    $notCurrent = $sessionStore->__get($key) != $this->_vars->offsetGet($key);
                } else {
                    $notCurrent = $sessionStore->__isset($key) || $this->_vars->offsetExists($key);
                }

                if ($notCurrent) {
                    break;
                }
            }
            if (! $notCurrent) {
                // When this is the case, use the \Zend_Session_Namespace object with the current set values
                // This way changes to this user object are reflected in the CurrentUser object and vice versa.
                $this->setAsCurrentUser();
            }
        }

        // Change a numeric role id to it's string value
        $this->_getRole('user_role');
        if ($this->_hasVar('current_user_role')) {
            $this->_getRole('current_user_role');
        }

        return (boolean) $this->acl && $this->userLoader;
    }
558868
public function check()
    {
        if ($this->user !== null) {
            return $this->user;
        }

        if (! $code = $this->persistences->check()) {
            return false;
        }

        if (! $user = $this->persistences->findUserByPersistenceCode($code)) {
            return false;
        }

        if (! $this->cycleCheckpoints('check', $user)) {
            return false;
        }

        return $this->user = $user;
    }
1050449
public function isBypassEnabled() {
        $cookieName = Mage::helper('turpentine/data')->getBypassCookieName();
        $cookieValue = Mage::getModel('core/cookie')->get($cookieName);

        return $cookieValue === $this->getSecretHandshake();
    }
1290522
def is_throttled(e):
    
    return True if (hasattr(e, 'response') and
                    e.response is not None and
                    'Error' in e.response and
                    e.response['Error']['Code'] in ['Throttling', 'RequestLimitExceeded', 'ThrottlingException']) else \
        False
714364
public function isRunning()
    {
        $runningStatuses = [
            self::SUBSCRIPTION_STATUS_ACTIVE,
            self::SUBSCRIPTION_STATUS_TRIAL,
        ];

        return in_array($this->getStatus(), $runningStatuses, true);
    }
979192
public function isLogged()
    {
        if (is_null($this->logged)) {
            $this->logged = (bool)is_user_logged_in();
        }

        return $this->logged;
    }
340184
public function checkRegistryRequestsAnswers()
    {
        if ($this->_respTrackData && $this->currentUser instanceof \Gems_User_User) {
            $this->_respTrackData = $this->currentUser->applyGroupMask($this->_respTrackData);
        } else {
            if ($this->db instanceof \Zend_Db_Adapter_Abstract) {
                $this->refresh();
            }
        }

        return (boolean) $this->_respTrackData;
    }
265677
public function canEdit()
    {
        if($this->getMixer() instanceof KControllerModellable)
        {
            $user = $this->getUser();
            if ($user->isAuthentic() && $user->isEnabled()) {
                return true;
            }
        }

        return false;
    }
1072416
public function isUserLogged()
    {
        return ($this->nb_user !== null && $this->nb_role !== null && $this->nb_site_user !== null);
    }
905085
public function isMobile() {
		if ($this->isMobile !== null) {
			return $this->isMobile;
		}

		$this->isMobile = Configure::read('User.isMobile');
		if ($this->isMobile !== null) {
			return $this->isMobile;
		}
		$this->isMobile = (bool)$this->detect();

		Configure::write('User.isMobile', (int)$this->isMobile);
		return $this->isMobile;
	}
1197079
public function status(){
        switch(session_status()){
            case PHP_SESSION_NONE:
                return self::NONE;
                
            case PHP_SESSION_ACTIVE:
                return self::ACTIVE;
                
            case PHP_SESSION_DISABLED:
            default:
                return self::DISABLED;
        }
    }
1063109
public function isBlocked()
    {
        if ($this->user() === null) {
            return null;
        }

        // Check user blocking status only if User model is role based user
        if ($this->user instanceof User) {
            return $this->user->blocked;
        }

        return false;
    }