on deleteUsers hook: we need an admin connection, but we have to check general connected status as well, in case we are not

This commit is contained in:
Klaus Leithoff 2013-09-20 07:43:19 +00:00
parent 0bc9b1357c
commit b14cc0c07e

View File

@ -85,9 +85,9 @@ class cyrusimap extends defaultimap
return false;
}
// we need a admin connection
if($this->_connected === true && !$this->isAdminConnection) {
$this->disconnect();
// we need a admin connection, but check connected status as well, in case we are not
if(($this->_connected === true && !$this->isAdminConnection) || !($this->_connected === true)) {
if ($this->_connected === true) $this->disconnect();
if(!$this->openConnection(true)) {
return false;
}