diff options
-rw-r--r-- | inc/auth/ldap.class.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/inc/auth/ldap.class.php b/inc/auth/ldap.class.php index 420043238..8eb411995 100644 --- a/inc/auth/ldap.class.php +++ b/inc/auth/ldap.class.php @@ -158,8 +158,11 @@ class auth_ldap extends auth_basic { // in some cases getUserData is called outside the authentication workflow // eg. for sending email notification on subscribed pages. This data might not // be accessible anonymously, so we try to rebind the current user here - $pass = PMA_blowfish_decrypt($_SESSION[DOKU_COOKIE]['auth']['pass'],auth_cookiesalt()); - $this->checkPass($_SESSION[DOKU_COOKIE]['auth']['user'], $pass); + list($loginuser,$loginsticky,$loginpass) = auth_getCookie(); + if($loginuser && $loginpass){ + $loginpass = PMA_blowfish_decrypt($loginpass, auth_cookiesalt(!$loginsticky)); + $this->checkPass($loginuser, $loginpass); + } } $info['user'] = $user; |