Fixes S::user() for non-hruid branches.
authorVincent Zanotti <vincent.zanotti@polytechnique.org>
Mon, 25 Aug 2008 13:58:34 +0000 (15:58 +0200)
committerVincent Zanotti <vincent.zanotti@polytechnique.org>
Mon, 25 Aug 2008 13:58:34 +0000 (15:58 +0200)
Signed-off-by: Vincent Zanotti <vincent.zanotti@polytechnique.org>
classes/s.php

index 030cca9..9cc1637 100644 (file)
@@ -96,7 +96,7 @@ class S
     private static $user = null;
     public static function &user()
     {
-        if (self::$user == null) {
+        if (self::$user == null && class_exists('User')) {
             self::$user = User::getSilentWithValues(S::i('uid'), $_SESSION);
         }
         return self::$user;