Fixes module 'admin' (handler 'user') when no login is provided.
authorVincent Zanotti <vincent.zanotti@m4x.org>
Sat, 11 Apr 2009 01:22:54 +0000 (03:22 +0200)
committerVincent Zanotti <vincent.zanotti@m4x.org>
Sat, 11 Apr 2009 01:22:54 +0000 (03:22 +0200)
Signed-off-by: Vincent Zanotti <vincent.zanotti@m4x.org>
modules/admin.php

index 82344c7..1caaa6c 100644 (file)
@@ -377,6 +377,10 @@ class AdminModule extends PLModule
 
         // Loads the user identity using the environment.
         $user = User::get($login);
+        if (!$user) {
+            return;
+        }
+
         $login = $user->login();
         $registered = ($user->state != 'pending');