@param $uid

@return int
768660
public function getGatewayCustomerId($uid)
    {
		$result = 0;
		$user   = $this->findUser( $uid );
		if (! is_null($user)) {
			$result = intval($user->getGatewayCustomerId());
		}

		return $result;
	}
162979
public function serverGetByUid($uid)
  {
    foreach($this->serverList() as $server)
    {
      if($server["virtualserver_unique_identifier"] == $uid) return $server;
    }

    throw new TeamSpeak3_Adapter_ServerQuery_Exception("invalid serverID", 0x400);
  }
1270014
private function getPageByUid($uid)
    {
        if (null === $page = $this->getApplication()->getEntityManager()->find('BackBee\NestedNode\Page', $uid)) {
            throw new NotFoundHttpException("Unable to find page with uid `$uid`");
        }

        return $page;
    }
627482
public function getUnreadMessagesCount($uid)
	{
		if (!$uid)
		{
			return 0;
		}

		$r = $this->getTableName();
		$m = Message::blank()->getTableName();
		$s = Seen::blank()->getTableName();

		$entries = Message::blank()
			->join($r, $m . '.id', $r . '.mid', 'inner')
			->whereEquals($r . '.uid', $uid)
			->where($r . '.state', '!=', 2)
			->whereRaw($m . ".id NOT IN (SELECT s.mid FROM `" . $s . "` AS s WHERE s.uid=" . $uid . ")");

		return $entries->total();
	}
190553
protected function getRecordPageId($table, $uid)
    {
        $record = BackendUtility::getRecord($table, $uid, 'pid');
        return !empty($record['pid']) ? (int)$record['pid'] : 0;
    }
1201059
public function getHeader( $uid = '' )
	{
		$html = '';

		foreach( $this->getSubClients() as $subclient ) {
			$html .= $subclient->setView( $this->view )->getHeader( $uid );
		}

		return $html;
	}
79407
public function getBody( $uid = '' )
	{
		$view = $this->getView();

		$html = '';
		foreach( $this->getSubClients() as $subclient ) {
			$html .= $subclient->setView( $view )->getBody( $uid );
		}

		return $html;
	}
1138464
public function getPageByUid(int $uid, int $languageUid = null) {
    return $this->getPage($uid, $languageUid);
  }
141436
public function getUserInfo($uid) {

        $userinfo = [];

        if (empty($this->userInfo)){

            $userinfo = $this->config['auth_cache'] ? Session::get($this->getUserKey($uid)) : [];

            if (empty($userinfo) || !is_array($userinfo)){
                $user = Db::name($this->config['users']);
                // 获取用户表主键
                $_pk = is_string($user->getPk()) ? $user->getPk() : 'id';

                $userinfo = $user->field($this->config['users_auth_fields'])->where($_pk, $uid)->find();

                if ($this->config['auth_cache'])
                    Session::set($this->getUserKey($uid),$userinfo);
            }


            $this->userInfo = $userinfo;
        }

        return $this->userInfo;
    }
599846
public function getAllThreadIdsForUser($uid) {
    $query = 'SELECT DISTINCT(thread.id), MAX(thread.updated) ' .
      'FROM {private_message_threads} AS thread ' .
      'JOIN {private_message_thread__members} AS member ' .
      'ON member.entity_id = thread.id AND member.members_target_id = :uid ' .
      'JOIN {private_message_thread__private_messages} AS thread_messages ' .
      'ON thread_messages.entity_id = thread.id ' .
      'JOIN {private_messages} AS messages ' .
      'ON messages.id = thread_messages.private_messages_target_id ' .
      'JOIN {private_message_thread__last_delete_time} AS thread_delete_time ' .
      'ON thread_delete_time.entity_id = thread.id ' .
      'JOIN {pm_thread_delete_time} as owner_delete_time ' .
      'ON owner_delete_time.id = thread_delete_time.last_delete_time_target_id AND owner_delete_time.owner = :uid ' .
      'WHERE owner_delete_time.delete_time <= messages.created ';
    $vars = [':uid' => $uid];

    $query .= 'GROUP BY thread.id ORDER BY MAX(thread.updated) DESC, thread.id';

    $thread_ids = $this->database->query(
      $query,
      $vars
    )->fetchCol();

    return is_array($thread_ids) ? $thread_ids : [];
  }
982770
protected function kickUid($uid)
    {
        if (Start::$testUnity) {
            $this->testUnitSendStack[] = ['action' => 'kickUid', 'uid' => $uid];
        } else {
            get_instance()->kickUid($uid);
        }
    }
829378
public static function resolvetoFIDtoURI(int $fid) {

        if (!is_integer($fid)) {
            return null;
        }
        /* @var \Drupal\file\FileInterface $file */
        $file = \Drupal::entityTypeManager()->getStorage('file')->load($fid);
        return $file;
    }
1315270
public static function tid(): int
    {
        if (!ServerUtil::coroutineIsEnabled()) {
            return -1;
        }

        $id = SwCoroutine::getuid();

        return self::$idMap[$id] ?? $id;
    }
1013034
public static function getClientIdByUid($uid)
    {
        $gateway_data             = GatewayProtocol::$empty;
        $gateway_data['cmd']      = GatewayProtocol::CMD_GET_CLIENT_ID_BY_UID;
        $gateway_data['ext_data'] = $uid;
        $client_list              = array();
        $all_buffer_array         = self::getBufferFromAllGateway($gateway_data);
        foreach ($all_buffer_array as $local_ip => $buffer_array) {
            foreach ($buffer_array as $local_port => $connection_id_array) {
                if ($connection_id_array) {
                    foreach ($connection_id_array as $connection_id) {
                        $client_list[] = Context::addressToClientId($local_ip, $local_port, $connection_id);
                    }
                }
            }
        }
        return $client_list;
    }
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);
        }
    }
89963
public function update($uid)
    {
        if (!Input::has('user')) {
            return $this->jsonErrorResponse('"user" is required.');
        }

        $user = Subbly::api('subbly.user')->update($uid, Input::get('user'));

        return $this->jsonResponse(array(
            'user' => $this->presenter->single($user),
        ),
        array(
            'status' => array(
                'code'    => 200,
                'message' => 'User updated',
            ),
        ));
    }
679313
public function getUserinfo($uid = null)
	{
		$ret = array();
		if (extension_loaded('posix')) {
			if (is_null($uid)) {
				$uid = posix_geteuid();	// get effective userid
			} elseif (is_string($uid)) {
				// username passed?
				$ret = posix_getpwnam($uid);
			}
			if (empty($ret)) {
				$ret = posix_getpwuid($uid);
			}
			$ret['group'] = posix_getgrgid($uid_info['gid']);
			unset($ret['gid']);	// is inside group array
		}
		return $ret;
	}