function _authenticate($userID, $credentials)
{
// Check for valid IMAP Client object.
- if (!$GLOBALS['imp_imap']->loadImapObject()) {
+ if (!$GLOBALS['imp_imap']->ob) {
// Attempt to create IMAP Client object
$key = isset($credentials['server']) ? $credentials['server'] : IMP_Session::getAutoLoginServer();
if (is_null($key) ||
{
/* Register the logging callback. */
Horde_Imap_Client_Exception::$logCallback = array($this, 'logException');
+
+ /* Rebuild the Horde_Imap_Client object. */
+ $this->_loadImapObject();
}
/**
*
* @return boolean True on success, false on error.
*/
- public function loadImapObject()
+ protected function _loadImapObject()
{
if (!is_null($this->ob)) {
return true;
public function getNamespaceList()
{
try {
- $this->loadImapObject();
return $GLOBALS['imp_imap']->ob->getNamespaces(!empty($_SESSION['imp']['imap_ext']['namespace']) ? $_SESSION['imp']['imap_ext']['namespace'] : array());
} catch (Horde_Imap_Client_Exception $e) {
// @todo Error handling