protected function inactiveUsers(LoginForm &$loginForm)
    {
        if (UsersModule::module()->allowLoginInactiveAccounts === false) {
            return [];
        }
        return [
            'username',
            function ($attribute) use (&$loginForm) {
                if ($loginForm->user !== null && $loginForm->user->is_active === false) {
                    $loginForm->addError($attribute, Yii::t('users', 'You need to confirm your email address'));
                }
            }
        ];
    }
protected function inactiveUsers(LoginForm &$loginForm)
    {
        if (UsersModule::module()->allowLoginInactiveAccounts === false) {
            return [];
        }
        return [
            'username',
            function ($attribute) use (&$loginForm) {
                if ($loginForm->user !== null && $loginForm->user->is_active === false) {
                    $loginForm->addError($attribute, Yii::t('users', 'You need to confirm your email address'));
                }
            }
        ];
    }
protected function inactiveUsers ( LoginForm & $ loginForm ) { if ( UsersModule :: module ( ) -> allowLoginInactiveAccounts === false ) { return [ ] ; } return [ 'username' , function ( $ attribute ) use ( & $ loginForm ) { if ( $ loginForm -> user !== null && $ loginForm -> user -> is_active === false ) { $ loginForm -> addError ( $ attribute , Yii :: t ( 'users' , 'You need to confirm your email address' ) ) ; } } ] ; }
Adds validation rule to not accept inactive users if such feature is toggled on in module configuration.

@param \DevGroup\Users\models\LoginForm $loginForm

@return array
Adds validation rule to not accept inactive users if such feature is toggled on in module configuration .