correction notive data users xml
authordj3c1t <dj3c1t@dj3c1t.net>
Sun, 23 Dec 2012 19:45:32 +0000 (20:45 +0100)
committerdj3c1t <dj3c1t@dj3c1t.net>
Sun, 23 Dec 2012 19:45:32 +0000 (20:45 +0100)
mw/app/data/modules/xml/mw_data_users.php

index a55257a..70287a3 100644 (file)
     }
 
     function password_ok($user, $password){
+      if(!$user) return false;
       return
-      strcmp(md5($user["password"].$_SESSION["id"]), $password) == 0
-      && $_SESSION["ip"] == $_SERVER["REMOTE_ADDR"];
+           strcmp(md5($user["password"].$_SESSION["id"]), $password) == 0
+        && $_SESSION["ip"] == $_SERVER["REMOTE_ADDR"];
     }
 
     # ----------------------------------------------------------------------------------------