public function getIds() { if (!$this->user['user_id']) { $this->errorOutput(USENAME_NOLOGIN); //用户未登录 } $id = $this->input['id']; //被关注ID /** * 从mmecache中获取关注用户IDS */ $cache_data = FRIENDS_MEM_PRE . $id; $firends = hg_check_cache($cache_data, "friends({$id})"); $firends = explode(',', $firends); $this->setXmlNode('id_list', 'id'); foreach ($firends as $item) { $this->addItem($item); } $this->output(); }
public function getIds() { if (!$this->user['user_id']) { $this->errorOutput(USENAME_NOLOGIN); //用户未登录 } $id = $this->input['id']; //关注者ID /** * 从mmecache中获取粉丝用户IDS */ $cache_data = FOLLOWERS_MEM_PRE . $id; $follows = hg_check_cache($cache_data, "followers({$id})"); $follows = explode(',', $follows); $this->setXmlNode('id_list', 'id'); foreach ($follows as $item) { $this->addItem($item); } $this->output(); }
public function get_ids() { $userinfo = $this->mUserlib->verify_user(); //验证用户是否登录 if (!$userinfo) { $this->errorOutput(USENAME_NOLOGIN); //用户未登录 } $id = $this->input['id']; //当前用户ID /** * 从mmecache中获取黑名单IDS */ $cache_data = BLOCKERS_MEM_PRE . $id; $blockers = hg_check_cache($cache_data, "blockers({$id})"); $blockers = explode(',', $blockers); $this->setXmlNode('id_list', 'id'); foreach ($blockers as $item) { $this->addItem($item); } $this->output(); }