original_string: public function getSession($key = null)
      {
          $user = $this->session->get('user', array());
  
          if (isset($key)) {
              return gplcart_array_get($user, $key);
          }
  
          return $user;
      }
code: public function getSession($key = null)
      {
          $user = $this->session->get('user', array());
  
          if (isset($key)) {
              return gplcart_array_get($user, $key);
          }
  
          return $user;
      }
code_tokens: public function getSession ( $ key = null ) { $ user = $ this -> session -> get ( 'user' , array ( ) ) ; if ( isset ( $ key ) ) { return gplcart_array_get ( $ user , $ key ) ; } return $ user ; }
docstring: Returns the current user from the session
  @param array|string $key
  @return mixed
docstring_tokens: Returns the current user from the session