original_string: 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'));
                  }
              }
          ];
      }
code: 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'));
                  }
              }
          ];
      }
code_tokens: 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' ) ) ; } } ] ; }
docstring: 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
docstring_tokens: Adds validation rule to not accept inactive users if such feature is toggled on in module configuration .