summaryrefslogtreecommitdiff
path: root/lib/util.php
diff options
context:
space:
mode:
authorSiebrand Mazeland <s.mazeland@xs4all.nl>2009-11-11 19:58:43 +0100
committerSiebrand Mazeland <s.mazeland@xs4all.nl>2009-11-11 19:58:43 +0100
commit086759f32ab6d2c5aadecb57941e7e14015b8bd6 (patch)
tree5b4e2875a7bf02717a8a987d5c1af91318a2fe29 /lib/util.php
parent37c62c6356af22a7b1eb444b241083d9fa53166e (diff)
parent6a19bcc0e2e2e0d0743480921e3be787b5b27729 (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.php7
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;
+ }
}
}