Fixed unable to switch to default ident after two or more time switching

between another identities.
This commit is contained in:
Boris Gulay
2016-05-30 01:45:40 +03:00
parent d93dd2be03
commit ab7bae56b5

View File

@@ -398,11 +398,13 @@ class ident_switch extends rcube_plugin
{
if (strncasecmp($k, 'storage', 7) === 0 && substr_compare($k, $this->my_postfix, -$my_postfix_len, $my_postfix_len) !== 0)
{
if (!$_SESSION[$k . $this->my_postfix])
$_SESSION[$k . $this->my_postfix] = $_SESSION[$k];
$rc->session->remove($k);
}
}
}
if (!$_SESSION['password' . $this->my_postfix])
$_SESSION['password' . $this->my_postfix] = $_SESSION['password'];
$_SESSION['storage_host'] = $r['host'] ? $r['host'] : 'localhost'; // Default host here!