original_string: public function user($key = null)
      {
          $user = $this->storage()->read();
          if (!$user) {
              return null;
          }
  
          if ($key === null) {
              return $user;
          }
  
          return Hash::get($user, $key);
      }
code: public function user($key = null)
      {
          $user = $this->storage()->read();
          if (!$user) {
              return null;
          }
  
          if ($key === null) {
              return $user;
          }
  
          return Hash::get($user, $key);
      }
code_tokens: public function user ( $ key = null ) { $ user = $ this -> storage ( ) -> read ( ) ; if ( ! $ user ) { return null ; } if ( $ key === null ) { return $ user ; } return Hash :: get ( $ user , $ key ) ; }
docstring: Get the current user from storage.
  
  @param string|null $key Field to retrieve. Leave null to get entire User record.
  @return mixed|null Either User record or null if no user is logged in, or retrieved field if key is specified.
  @link https://book.cakephp.org/3.0/en/controllers/components/authentication.html#accessing-the-logged-in-user
docstring_tokens: Get the current user from storage .