]> git.mjollnir.org Git - moodle.git/commitdiff
If the cache flag is not set, it doesn't make sense trying to test its value
authormartinlanghoff <martinlanghoff>
Mon, 19 Nov 2007 02:43:34 +0000 (02:43 +0000)
committermartinlanghoff <martinlanghoff>
Mon, 19 Nov 2007 02:43:34 +0000 (02:43 +0000)
Signed-off-by: Iñaki Arenaza <iarenuno@eteo.mondragon.edu>
Author: Iñaki Arenaza <iarenuno@eteo.mondragon.edu>
Committer: Martin Langhoff <martin@catalyst.net.nz>

auth/ldap/auth.php

index 55f35d908508f59397e8e25b7fc6398bccb388e7..a15324567521dea63367b896a9a032549dfc9570 100644 (file)
@@ -1827,7 +1827,7 @@ class auth_plugin_ldap extends auth_plugin_base {
 
         $key = sesskey();
         $cf = get_cache_flags('auth/ldap/ntlmsess');
-        if (!isset($cf[$key]) && $cf[$key] !== '') {
+        if (!isset($cf[$key]) || $cf[$key] === '') {
             return false;
         }
         $username   = $cf[$key];