summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSarven Capadisli <csarven@status.net>2009-11-11 18:47:51 +0000
committerSarven Capadisli <csarven@status.net>2009-11-11 18:47:51 +0000
commit6a19bcc0e2e2e0d0743480921e3be787b5b27729 (patch)
treeced56ff7fd8ff1bcba7d1121ba5cb9a04d0dcfd9 /lib
parent095cf8ebf1e95dfc2e625ca6a7f705dbf007a9fd (diff)
parent7f8dbb8e457d1e5534ebb569988d84ee3adaeef7 (diff)
Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x
Diffstat (limited to 'lib')
-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;
+ }
}
}