public function user($user = null)
    {
        if ($user !== null) {
            $this->_user = $user;

            return;
        }

        if ($this->_user === false) {
            if (($session = $this->getSession()) && $session->id) {
                $this->_user = auth()->who($session);
            } else {
                $this->_user = null;
            }
        }

        return $this->_user;
    }
public function user($user = null)
    {
        if ($user !== null) {
            $this->_user = $user;

            return;
        }

        if ($this->_user === false) {
            if (($session = $this->getSession()) && $session->id) {
                $this->_user = auth()->who($session);
            } else {
                $this->_user = null;
            }
        }

        return $this->_user;
    }
public function user ( $ user = null ) { if ( $ user !== null ) { $ this -> _user = $ user ; return ; } if ( $ this -> _user === false ) { if ( ( $ session = $ this -> getSession ( ) ) && $ session -> id ) { $ this -> _user = auth ( ) -> who ( $ session ) ; } else { $ this -> _user = null ; } } return $ this -> _user ; }
Gets or sets the authenticated user for this request.

@param Authenticatable $user
@return \blink\auth\Authenticatable|null
Gets or sets the authenticated user for this request .