diff options
author | Siebrand Mazeland <s.mazeland@xs4all.nl> | 2009-11-11 19:58:43 +0100 |
---|---|---|
committer | Siebrand Mazeland <s.mazeland@xs4all.nl> | 2009-11-11 19:58:43 +0100 |
commit | 086759f32ab6d2c5aadecb57941e7e14015b8bd6 (patch) | |
tree | 5b4e2875a7bf02717a8a987d5c1af91318a2fe29 /lib/util.php | |
parent | 37c62c6356af22a7b1eb444b241083d9fa53166e (diff) | |
parent | 6a19bcc0e2e2e0d0743480921e3be787b5b27729 (diff) |
Merge branch '0.9.x' of git://gitorious.org/statusnet/mainline into 0.9.x
Diffstat (limited to 'lib/util.php')
-rw-r--r-- | lib/util.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/util.php b/lib/util.php index 81160d052..7aca4af8d 100644 --- a/lib/util.php +++ b/lib/util.php @@ -350,8 +350,11 @@ function common_current_user() common_ensure_session(); $id = isset($_SESSION['userid']) ? $_SESSION['userid'] : false; if ($id) { - $_cur = User::staticGet($id); - return $_cur; + $user = User::staticGet($id); + if ($user) { + $_cur = $user; + return $_cur; + } } } |