Set the global $_cur current user so that preferences are loaded.

Thanks singpolyma

http://laconi.ca/trac/ticket/1573
This commit is contained in:
Craig Andrews 2009-07-21 15:17:54 -04:00
parent 52d51fad3c
commit 3649b9ffbc

View File

@ -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;