try to disconnect, when connect was successful, but no username for login is supplied

This commit is contained in:
Klaus Leithoff 2011-10-10 10:20:33 +00:00
parent 859e431762
commit adf90ad4ca

View File

@ -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)) ) {