diff options
author | Craig Andrews <candrews@integralblue.com> | 2009-07-21 15:17:54 -0400 |
---|---|---|
committer | Craig Andrews <candrews@integralblue.com> | 2009-07-21 15:17:54 -0400 |
commit | 3649b9ffbc40c3695344597330ad9c35b26a4976 (patch) | |
tree | e1840135f78236623554617875307605f92eec5f /scripts | |
parent | 52d51fad3c4716a1978553921ececee571cf9971 (diff) |
Set the global $_cur current user so that preferences are loaded.
Thanks singpolyma
http://laconi.ca/trac/ticket/1573
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/xmppdaemon.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/xmppdaemon.php b/scripts/xmppdaemon.php index 488b4b514..69512f243 100755 --- a/scripts/xmppdaemon.php +++ b/scripts/xmppdaemon.php @@ -175,6 +175,10 @@ class XMPPDaemon extends Daemon $user = $this->get_user($from); + // For common_current_user to work + global $_cur; + $_cur = $user; + if (!$user) { $this->from_site($from, 'Unknown user; go to ' . common_local_url('imsettings') . @@ -211,6 +215,7 @@ class XMPPDaemon extends Daemon $user->free(); unset($user); + unset($_cur); unset($pl['xml']); $pl['xml'] = null; |