Index: Session.php
===================================================================
RCS file: /repository/imp/lib/Session.php,v
retrieving revision 1.113
diff -u -u -r1.113 Session.php
--- Session.php	1 Jan 2006 21:10:44 -0000	1.113
+++ Session.php	2 Jan 2006 14:17:08 -0000
@@ -268,7 +268,12 @@
                     $auth_imp->IMPsetAuthErrorMsg($res->getMessage());
                     return false;
                 }
-                $_SESSION['imp']['namespace'] = $imapclient->namespace($user_namespace);
+                if (count($user_namespace) == 0) {
+                    $_SESSION['imp']['namespace'] = $imapclient->namespace($user_namespace);
+                } else {
+                    $_SESSION['imp']['namespace'] = $user_namespace;
+                }
+
                 if (!is_array($_SESSION['imp']['namespace'])) {
                     $auth_imp->IMPsetAuthErrorMsg(_("Could not retrieve namespace information from IMAP server."));
                     return false;
