summaryrefslogtreecommitdiff
path: root/lib/util.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2009-11-19 09:04:56 -0500
committerEvan Prodromou <evan@status.net>2009-11-19 09:04:56 -0500
commitb657e49ec772aec2b60ae193252edd53d85e1df5 (patch)
tree71f6054ac22b8355f434fd9bf4c2ccfc1afc5140 /lib/util.php
parentfa35dab2265aba78f7c704c34eaef4100bddfd70 (diff)
parent269781280903d80141788225ec858fbf6501971d (diff)
Merge branch '0.9.x' into mapstraction
Diffstat (limited to 'lib/util.php')
-rw-r--r--lib/util.php13
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/util.php b/lib/util.php
index 68f3520db..5bf4f6091 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -196,10 +196,15 @@ function common_set_user($user)
}
if ($user) {
- common_ensure_session();
- $_SESSION['userid'] = $user->id;
- $_cur = $user;
- return $_cur;
+ if (Event::handle('StartSetUser', array(&$user))) {
+ if($user){
+ common_ensure_session();
+ $_SESSION['userid'] = $user->id;
+ $_cur = $user;
+ Event::handle('EndSetUser', array($user));
+ return $_cur;
+ }
+ }
}
return false;
}