From 3649b9ffbc40c3695344597330ad9c35b26a4976 Mon Sep 17 00:00:00 2001 From: Craig Andrews Date: Tue, 21 Jul 2009 15:17:54 -0400 Subject: [PATCH] Set the global $_cur current user so that preferences are loaded. Thanks singpolyma http://laconi.ca/trac/ticket/1573 --- scripts/xmppdaemon.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/xmppdaemon.php b/scripts/xmppdaemon.php index 488b4b514c..69512f2438 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; -- 2.39.5