From adf90ad4cad12f566c5a26746b7c6af0ba6a02e4 Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Mon, 10 Oct 2011 10:20:33 +0000 Subject: [PATCH] try to disconnect, when connect was successful, but no username for login is supplied --- emailadmin/inc/class.defaultimap.inc.php | 1 + 1 file changed, 1 insertion(+) diff --git a/emailadmin/inc/class.defaultimap.inc.php b/emailadmin/inc/class.defaultimap.inc.php index 909f722c76..04487e29b7 100644 --- a/emailadmin/inc/class.defaultimap.inc.php +++ b/emailadmin/inc/class.defaultimap.inc.php @@ -525,6 +525,7 @@ class defaultimap extends Net_IMAP if(empty($username)) { if ($this->debug) error_log(__METHOD__."No username supplied.".function_backtrace()); + if ($this->_connected) $this->disconnect(); // disconnect (if connected) return false; } if( PEAR::isError($status = parent::login($username, $password, 'LOGIN', !$this->isAdminConnection)) ) {