src/Common/Controller/Base.php
protected function isUserSuspended()
    {
        //  Check if this user is suspended
        if (isLoggedIn() && activeUser('is_suspended')) {

            //  Load models and langs
            $oAuthModel = Factory::model('Auth', 'nails/module-auth');
            $this->lang->load('auth/auth');

            //  Log the user out
            $oAuthModel->logout();

            //  Create a new session
            $oSession = Factory::service('Session', 'nails/module-auth');
            $oSession->sess_create();

            //  Give them feedback
            $oSession->setFlashData('error', lang('auth_login_fail_suspended'));
            redirect('/');
        }
    }
protected function isUserSuspended()
    {
        //  Check if this user is suspended
        if (isLoggedIn() && activeUser('is_suspended')) {

            //  Load models and langs
            $oAuthModel = Factory::model('Auth', 'nails/module-auth');
            $this->lang->load('auth/auth');

            //  Log the user out
            $oAuthModel->logout();

            //  Create a new session
            $oSession = Factory::service('Session', 'nails/module-auth');
            $oSession->sess_create();

            //  Give them feedback
            $oSession->setFlashData('error', lang('auth_login_fail_suspended'));
            redirect('/');
        }
    }
protected function isUserSuspended ( ) { //  Check if this user is suspended if ( isLoggedIn ( ) && activeUser ( 'is_suspended' ) ) { //  Load models and langs $ oAuthModel = Factory :: model ( 'Auth' , 'nails/module-auth' ) ; $ this -> lang -> load ( 'auth/auth' ) ; //  Log the user out $ oAuthModel -> logout ( ) ; //  Create a new session $ oSession = Factory :: service ( 'Session' , 'nails/module-auth' ) ; $ oSession -> sess_create ( ) ; //  Give them feedback $ oSession -> setFlashData ( 'error' , lang ( 'auth_login_fail_suspended' ) ) ; redirect ( '/' ) ; } }
Determines whether the active user is suspended and, if so, logs them out.

@return void
Determines whether the active user is suspended and if so logs them out .