src/Towel/BaseApp.php
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;
    }
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;
    }
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 ; }
Gets the current user or false if is not authenticated.

@returns \Towel\Model\BaseModel
Gets the current user or false if is not authenticated .