summaryrefslogtreecommitdiff
path: root/scripts/xmppdaemon.php
diff options
context:
space:
mode:
authorCraig Andrews <candrews@integralblue.com>2009-07-21 15:17:54 -0400
committerCraig Andrews <candrews@integralblue.com>2009-07-21 15:17:54 -0400
commit3649b9ffbc40c3695344597330ad9c35b26a4976 (patch)
treee1840135f78236623554617875307605f92eec5f /scripts/xmppdaemon.php
parent52d51fad3c4716a1978553921ececee571cf9971 (diff)
Set the global $_cur current user so that preferences are loaded.
Thanks singpolyma http://laconi.ca/trac/ticket/1573
Diffstat (limited to 'scripts/xmppdaemon.php')
-rwxr-xr-xscripts/xmppdaemon.php5
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;