original_string: public function getCurrentUser()
      {
          if (Towel::isCli()) {
            return false; //Cli is not logged.
          }
  
          $userRecord = $this->session()->get('user', false);
          if (!$userRecord) {
              return false;
          }
  
          $userModel = $this->getInstance('user_model');
          $userModel->setRecord($userRecord);
  
          return $userModel;
      }
code: public function getCurrentUser()
      {
          if (Towel::isCli()) {
            return false; //Cli is not logged.
          }
  
          $userRecord = $this->session()->get('user', false);
          if (!$userRecord) {
              return false;
          }
  
          $userModel = $this->getInstance('user_model');
          $userModel->setRecord($userRecord);
  
          return $userModel;
      }
code_tokens: public function getCurrentUser ( ) { if ( Towel :: isCli ( ) ) { return false ; //Cli is not logged. } $ userRecord = $ this -> session ( ) -> get ( 'user' , false ) ; if ( ! $ userRecord ) { return false ; } $ userModel = $ this -> getInstance ( 'user_model' ) ; $ userModel -> setRecord ( $ userRecord ) ; return $ userModel ; }
docstring: Gets the current user or false if is not authenticated.
  
  @returns \Towel\Model\BaseModel
docstring_tokens: Gets the current user or false if is not authenticated .