forked from GNUsocial/gnu-social
Set the global $_cur current user so that preferences are loaded.
Thanks singpolyma http://laconi.ca/trac/ticket/1573
This commit is contained in:
parent
52d51fad3c
commit
3649b9ffbc
@ -175,6 +175,10 @@ class XMPPDaemon extends Daemon
|
|||||||
|
|
||||||
$user = $this->get_user($from);
|
$user = $this->get_user($from);
|
||||||
|
|
||||||
|
// For common_current_user to work
|
||||||
|
global $_cur;
|
||||||
|
$_cur = $user;
|
||||||
|
|
||||||
if (!$user) {
|
if (!$user) {
|
||||||
$this->from_site($from, 'Unknown user; go to ' .
|
$this->from_site($from, 'Unknown user; go to ' .
|
||||||
common_local_url('imsettings') .
|
common_local_url('imsettings') .
|
||||||
@ -211,6 +215,7 @@ class XMPPDaemon extends Daemon
|
|||||||
|
|
||||||
$user->free();
|
$user->free();
|
||||||
unset($user);
|
unset($user);
|
||||||
|
unset($_cur);
|
||||||
|
|
||||||
unset($pl['xml']);
|
unset($pl['xml']);
|
||||||
$pl['xml'] = null;
|
$pl['xml'] = null;
|
||||||
|
Loading…
Reference in New Issue
Block a user