original_string: public function auth(LoginForm $form): User
      {
          $this->checkFailure();
          $user = $this->user->findByUsernameOrEmail($form->username);
          if (!$user || !$user->validatePassword($form->password)) {
              $this->setFailure();
              throw new \DomainException($this->i18n->t('setrun/user', 'Wrong Username or Password'));
          }
          if ($user && $user->status == User::STATUS_BLOCKED) {
              throw new \DomainException($this->i18n->t('setrun/user', 'Account temporarily blocked'));
          }
          if ($user && $user->status == User::STATUS_WAIT) {
              throw new \DomainException($this->i18n->t('setrun/user', 'Account not confirmed'));
          }
          $this->removeFailure();
          return $user;
      }
code: public function auth(LoginForm $form): User
      {
          $this->checkFailure();
          $user = $this->user->findByUsernameOrEmail($form->username);
          if (!$user || !$user->validatePassword($form->password)) {
              $this->setFailure();
              throw new \DomainException($this->i18n->t('setrun/user', 'Wrong Username or Password'));
          }
          if ($user && $user->status == User::STATUS_BLOCKED) {
              throw new \DomainException($this->i18n->t('setrun/user', 'Account temporarily blocked'));
          }
          if ($user && $user->status == User::STATUS_WAIT) {
              throw new \DomainException($this->i18n->t('setrun/user', 'Account not confirmed'));
          }
          $this->removeFailure();
          return $user;
      }
code_tokens: public function auth ( LoginForm $ form ) : User { $ this -> checkFailure ( ) ; $ user = $ this -> user -> findByUsernameOrEmail ( $ form -> username ) ; if ( ! $ user || ! $ user -> validatePassword ( $ form -> password ) ) { $ this -> setFailure ( ) ; throw new \ DomainException ( $ this -> i18n -> t ( 'setrun/user' , 'Wrong Username or Password' ) ) ; } if ( $ user && $ user -> status == User :: STATUS_BLOCKED ) { throw new \ DomainException ( $ this -> i18n -> t ( 'setrun/user' , 'Account temporarily blocked' ) ) ; } if ( $ user && $ user -> status == User :: STATUS_WAIT ) { throw new \ DomainException ( $ this -> i18n -> t ( 'setrun/user' , 'Account not confirmed' ) ) ; } $ this -> removeFailure ( ) ; return $ user ; }
docstring: User auth.
  @param LoginForm $form
  @return User
docstring_tokens: User auth .