public function getSession($key = null)
    {
        $user = $this->session->get('user', array());

        if (isset($key)) {
            return gplcart_array_get($user, $key);
        }

        return $user;
    }
public function getSession($key = null)
    {
        $user = $this->session->get('user', array());

        if (isset($key)) {
            return gplcart_array_get($user, $key);
        }

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