清除Uid的订阅
@param $uid
198765
public function my_clearUidSub($uid)
    {
        if (empty($uid)) return;
        foreach ($this->subArr as $sub) {
            $sub->remove($uid);
        }
    }
702016
public function remove($id)
    {
        $id = (string) $id;

        $this->validateRemove($id);

        if (!$this->has($id)) {
            return;
        }

        unset($this->items[$id]);
    }
954047
public function sendToUid($uid, $data, $fromDispatch = false)
    {
        if ($this->uid_fd_table->exist($uid)) {//本机处理
            $fd = $this->uid_fd_table->get($uid)['fd'];
            $this->send($fd, $data, true);
        } else {
            if ($fromDispatch) {
                $this->onUidSendFail($uid, $data, null);

                return;
            }
            if ($this->isCluster()) {
                ProcessManager::getInstance()->getRpcCall(ClusterProcess::class, true)->my_sendToUid($uid, $data);
            } else {
                $this->onUidSendFail($uid, $data, null);
            }
        }
    }
467141
public static function removeUserFromGroups($uid)
	{
		$db = \App::get('db');
		$tables = array('#__xgroups_members', '#__xgroups_managers', '#__xgroups_invitees', '#__xgroups_applicants');

		foreach ($tables as $table)
		{
			$sql = "DELETE FROM `".$table."` WHERE uidNumber=" . $db->quote($uid);
			$db->setQuery($sql);
			$db->query();
		}

		return true;
	}
7142
public function filterByUserID($uID)
    {
        if ($this->includeAliases) {
            $db = Loader::db();
            $quID = $db->quote($uID);
            $this->filter(false, "(p1.uID = {$quID} or p2.uID = {$quID})");
        } else {
            $this->filter('p1.uID', $uID);
        }
    }
762538
public function leaveAll(int $fd)
    {
        $map = $this->map[$fd] ?? [];
        foreach($map as $group)
        {
            $group->leave($fd);
        }
    }
484130
public function resetData(array $data)
    {
        $this->data = $data;
        if ($this->existsKey('uid')) {
            if (!$this->hasUid()) {
                $this->setUid((int)$this->data['uid']);
            }
            unset($this->data['uid']);
        }

        $this->markAsLoaded();
        if ($this->hasUid()) {
            $this->markAsClean();
        } else {
            $this->markAsDirty();
        }
    }
150420
public function removeGarbageOf($table, $uid)
    {
        $this->removeGarbageOfByStrategy($table, $uid);
        $this->callPostProcessGarbageCollectorHook($table, $uid);
    }
761874
public function refreshUser($uid) {
		$user = WechatUser::findOne($uid);
		if(!$user) {
			throw new ErrorException('数据查询失败');
		}

		$data = $this->getData('/cgi-bin/user/info', [
			'access_token' => $this->getAccessToken(),
			'openid' => $user->openid,
			'lang' => \Yii::$app->language,
		]);

		$result = $this->errcode == 0;
		if($result) {
			$user->subscribe = $data['subscribe'];
			if($user->subscribe == 1) {
				$user->subscribed_at = $data['subscribe_time'];
				$user->name = $data['nickname'];
				$user->sex = $data['sex'];
				$user->country = $data['country'];
				$user->city = $data['city'];
				$user->province = $data['province'];
				$user->language = $data['language'];
				$user->headimgurl = $data['headimgurl'];
				$user->remark = $data['remark'];
				$user->groupid = $data['groupid'];
			}
			if(isset($data['unionid'])) {
				$user->unionid = $data['unionid'];
			}
			$user->save();
		}

		return $result;
	}
20035
@Override
	public void removeByUuid(String uuid) {
		for (CPDefinitionVirtualSetting cpDefinitionVirtualSetting : findByUuid(
				uuid, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
			remove(cpDefinitionVirtualSetting);
		}
	}
409437
protected function _deletePid($pid) {
		if (!$pid) {
			$pid = $this->_pid;
		}
		if (!$pid) {
			return;
		}

		$this->QueueProcesses->remove($pid);
	}
926737
public function setUid($uid)
    {
        if ($this->hasUid()) {
            throw new \BadMethodCallException('The UID of a model cannot be set a second time.', 1331489260);
        }
        if ($this->isVirgin()) {
            $this->setLoadStatus(self::STATUS_GHOST);
        }

        $this->uid = $uid;
    }
665405
public function purgeCurrent()
    {
        if (!$this->valid()) {
            return;
        }

        if ($this->current()->hasUid()) {
            $uid = $this->current()->getUid();
            if (isset($this->uids[$uid])) {
                unset($this->uids[$uid]);
            }
        }

        $this->detach($this->current());

        $this->markAsDirty();
    }
830869
public function _destroy($pId)
    {
        if (! isset($this->_items[$pId])) {
            $this->_items[$pId] = Agl::getModel(self::DB_COLLECTION);
            $this->_items[$pId]->loadByRealid($pId);
        }

        if ($this->_items[$pId]->getId()) {
            $this->_items[$pId]->delete();
        }

        return true;
    }
72155
public function delete($listUuid)
    {
        $list = $this->findListByUuid($listUuid);

        foreach (array_keys($list) as $elementUuid) {
            $this->deleteElement($listUuid, $elementUuid);
        }
    }
807214
function remove_message($mailbox = null, $uids = null)
    {
        if (!($this->mode & self::MODE_MESSAGE)) {
            return;
        }

        if (!strlen($mailbox)) {
            $this->db->query(
                "DELETE FROM {$this->messages_table}"
                ." WHERE `user_id` = ?",
                $this->userid);
        }
        else {
            // Remove the message from internal cache
            if (!empty($uids) && ($message = $this->icache['__message'])
                && $message['mailbox'] === $mailbox
                && in_array($message['object']->uid, (array)$uids)
            ) {
                $this->icache['__message'] = null;
            }

            $this->db->query(
                "DELETE FROM {$this->messages_table}"
                ." WHERE `user_id` = ?"
                    ." AND `mailbox` = ?"
                    .($uids !== null ? " AND `uid` IN (".$this->db->array2list((array)$uids, 'integer').")" : ""),
                $this->userid, $mailbox);
        }
    }
1077040
public function removeSub($topic, $uid)
    {
        ProcessManager::getInstance()->getRpcCall(ClusterProcess::class, true)->my_removeSub($topic, $uid);
    }