From: Michael M Slusarz Date: Thu, 20 Jan 2011 06:37:29 +0000 (-0700) Subject: Fix transparent login to imp if using preauthenticate hook X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=5936d6f0c83777f6c182c2b2708bb39117dc6d08;p=horde.git Fix transparent login to imp if using preauthenticate hook --- diff --git a/imp/lib/Auth.php b/imp/lib/Auth.php index e9021ccf3..9b0b420d3 100644 --- a/imp/lib/Auth.php +++ b/imp/lib/Auth.php @@ -145,16 +145,18 @@ class IMP_Auth */ static public function transparent($auth_ob) { - /* It is possible that preauthenticate() set the credentials. - * If so, use that information instead of hordeauth. */ - if ($auth_ob->getCredential('transparent')) { - $credentials = $auth_ob->getCredential(); - } else { + $credentials = $auth_ob->getCredential('credentials'); + + if (empty($credentials['transparent'])) { /* Attempt hordeauth authentication. */ $credentials = self::_canAutoLogin(); if ($credentials === false) { return false; } + } else { + /* It is possible that preauthenticate() set the credentials. + * If so, use that information instead of hordeauth. */ + $credentials['userId'] = $auth_ob->getCredential('userId'); } try {