]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Set the global $_cur current user so that preferences are loaded.
authorCraig Andrews <candrews@integralblue.com>
Tue, 21 Jul 2009 19:17:54 +0000 (15:17 -0400)
committerCraig Andrews <candrews@integralblue.com>
Tue, 21 Jul 2009 19:17:54 +0000 (15:17 -0400)
Thanks singpolyma

http://laconi.ca/trac/ticket/1573

scripts/xmppdaemon.php

index 488b4b514c46a8e997e5f14250380a49ad0fec42..69512f243895e6d6d2a9c023a5408638f141e1a1 100755 (executable)
@@ -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;