diff options
author | Haakon Meland Eriksen <haakon.eriksen@far.no> | 2015-12-03 18:14:52 +0100 |
---|---|---|
committer | Haakon Meland Eriksen <haakon.eriksen@far.no> | 2015-12-03 18:14:52 +0100 |
commit | c363fc71eb054ffa615bdfe03c645a9ab946379e (patch) | |
tree | 564dbaa2dac8bb13260704730a8e5483084baa67 /include/api.php | |
parent | b96f09bb3aeee403038755ab5f6e6b53654cb145 (diff) | |
parent | 9f3ea71d5d9e1e42d1d1e44a8070d90814962ad2 (diff) | |
download | volse-hubzilla-c363fc71eb054ffa615bdfe03c645a9ab946379e.tar.gz volse-hubzilla-c363fc71eb054ffa615bdfe03c645a9ab946379e.tar.bz2 volse-hubzilla-c363fc71eb054ffa615bdfe03c645a9ab946379e.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'include/api.php')
-rw-r--r-- | include/api.php | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/include/api.php b/include/api.php index f279b2aa3..e60583a01 100644 --- a/include/api.php +++ b/include/api.php @@ -382,7 +382,6 @@ require_once('include/api_auth.php'); function api_item_get_user(&$a, $item) { - global $usercache; // The author is our direct contact, in a conversation with us. @@ -396,11 +395,11 @@ require_once('include/api_auth.php'); $name = $item['author']['xchan_name']; // Generating a random ID - if (is_null($usercache[$nick]) or !array_key_exists($nick, $usercache)) - $usercache[$nick] = mt_rand(2000000, 2100000); + if (! $nick) + $nick = mt_rand(2000000, 2100000); $ret = array( - 'id' => $usercache[$nick], + 'id' => $nick, 'name' => $name, 'screen_name' => $nick, 'location' => '', //$uinfo[0]['default-location'], |