original_string: protected function loginUser()
      {
          $user = $this->getSubmitted();
          $result = $this->user_action->login($user);
  
          if (empty($result['user'])) {
              $this->setData('user', $user);
              $this->setMessage($result['message'], $result['severity']);
          } else {
              $this->redirect($result['redirect'], $result['message'], $result['severity']);
          }
      }
code: protected function loginUser()
      {
          $user = $this->getSubmitted();
          $result = $this->user_action->login($user);
  
          if (empty($result['user'])) {
              $this->setData('user', $user);
              $this->setMessage($result['message'], $result['severity']);
          } else {
              $this->redirect($result['redirect'], $result['message'], $result['severity']);
          }
      }
code_tokens: protected function loginUser ( ) { $ user = $ this -> getSubmitted ( ) ; $ result = $ this -> user_action -> login ( $ user ) ; if ( empty ( $ result [ 'user' ] ) ) { $ this -> setData ( 'user' , $ user ) ; $ this -> setMessage ( $ result [ 'message' ] , $ result [ 'severity' ] ) ; } else { $ this -> redirect ( $ result [ 'redirect' ] , $ result [ 'message' ] , $ result [ 'severity' ] ) ; } }
docstring: Log in a user
docstring_tokens: Log in a user