concrete/src/User/Login/LoginService.php
protected function handleUserError($errorNum)
    {
        switch ($errorNum) {
            case USER_INACTIVE:
                throw new NotActiveException(t($this->config->get('concrete.user.deactivation.message')));

            case USER_SESSION_EXPIRED:
                throw new SessionExpiredException(t('Your session has expired. Please sign in again.'));

            case USER_NON_VALIDATED:
                throw new NotValidatedException(t(
                    'This account has not yet been validated. Please check the email associated with this ' .
                    'account and follow the link it contains.'));
            case USER_PASSWORD_RESET:
                throw new UserPasswordResetException(t('This password has been reset.'));
            case USER_INVALID:
                if ($this->config->get('concrete.user.registration.email_registration')) {
                    $message = t('Invalid email address or password.');
                } else {
                    $message = t('Invalid username or password.');
                }

                throw new InvalidCredentialsException($message);
        }

        throw new \RuntimeException(t('An unknown login error occurred. Please try again.'));
    }
protected function handleUserError($errorNum)
    {
        switch ($errorNum) {
            case USER_INACTIVE:
                throw new NotActiveException(t($this->config->get('concrete.user.deactivation.message')));

            case USER_SESSION_EXPIRED:
                throw new SessionExpiredException(t('Your session has expired. Please sign in again.'));

            case USER_NON_VALIDATED:
                throw new NotValidatedException(t(
                    'This account has not yet been validated. Please check the email associated with this ' .
                    'account and follow the link it contains.'));
            case USER_PASSWORD_RESET:
                throw new UserPasswordResetException(t('This password has been reset.'));
            case USER_INVALID:
                if ($this->config->get('concrete.user.registration.email_registration')) {
                    $message = t('Invalid email address or password.');
                } else {
                    $message = t('Invalid username or password.');
                }

                throw new InvalidCredentialsException($message);
        }

        throw new \RuntimeException(t('An unknown login error occurred. Please try again.'));
    }
protected function handleUserError ( $ errorNum ) { switch ( $ errorNum ) { case USER_INACTIVE : throw new NotActiveException ( t ( $ this -> config -> get ( 'concrete.user.deactivation.message' ) ) ) ; case USER_SESSION_EXPIRED : throw new SessionExpiredException ( t ( 'Your session has expired. Please sign in again.' ) ) ; case USER_NON_VALIDATED : throw new NotValidatedException ( t ( 'This account has not yet been validated. Please check the email associated with this ' . 'account and follow the link it contains.' ) ) ; case USER_PASSWORD_RESET : throw new UserPasswordResetException ( t ( 'This password has been reset.' ) ) ; case USER_INVALID : if ( $ this -> config -> get ( 'concrete.user.registration.email_registration' ) ) { $ message = t ( 'Invalid email address or password.' ) ; } else { $ message = t ( 'Invalid username or password.' ) ; } throw new InvalidCredentialsException ( $ message ) ; } throw new \ RuntimeException ( t ( 'An unknown login error occurred. Please try again.' ) ) ; }
Throw an exception based on the given error number

@param int $errorNum The error number retrieved from the user object

@throws \RuntimeException If an unknown error number is passed
@throws \Concrete\Core\User\Exception\NotActiveException If the user is inactive
@throws \Concrete\Core\User\Exception\InvalidCredentialsException If passed credentials don't seem valid
@throws \Concrete\Core\User\Exception\NotValidatedException If the user has not yet been validated
@throws \Concrete\Core\User\Exception\SessionExpiredException If the session immediately expires after login
Throw an exception based on the given error number