Force delete user without password or captcha verification.

@param $uid
@return mixed
181628
public function deleteUserForced($uid)
    {
        $return['error'] = true;

        $query = "DELETE FROM {$this->config->table_users} WHERE id = :uid";
        $query_prepared = $this->dbh->prepare($query);

        if (!$query_prepared->execute(['uid' => $uid])) {
            $return['message'] = $this->__lang("system_error") . " #05";

            return $return;
        }

        $query = "DELETE FROM {$this->config->table_sessions} WHERE uid = :uid";
        $query_prepared = $this->dbh->prepare($query);

        if (!$query_prepared->execute(['uid' => $uid])) {
            $return['message'] = $this->__lang("system_error") . " #06";

            return $return;
        }

        $query = "DELETE FROM {$this->config->table_requests} WHERE uid = :uid";
        $query_prepared = $this->dbh->prepare($query);

        if (!$query_prepared->execute(['uid' => $uid])) {
            $return['message'] = $this->__lang("system_error") . " #07";

            return $return;
        }

        $return['error'] = false;
        $return['message'] = $this->__lang("account_deleted");

        return $return;
    }
1163212
public function deleteUsers($userids){
	    if (!$userids) return false;
	    $data = array('useridlist'=>$userids);
	    if (!$this->access_token && !$this->checkAuth()) return false;
	    $result = $this->http_post(self::API_URL_PREFIX.self::USER_BATCHDELETE_URL.'access_token='.$this->access_token,self::json_encode($data));
	    if ($result)
	    {
	        $json = json_decode($result,true);
	        if (!$json || !empty($json['errcode']) || $json['errcode']!=0) {
	            $this->errCode = $json['errcode'];
	            $this->errMsg = $json['errmsg'];
	            return false;
	        }
	        return $json;
	    }
	    return false;
	}
1344117
protected function getUserInfo($uid) {
        static $userinfo=array();
        if(!isset($userinfo[$uid])){
             $userinfo[$uid]=M()->where(array('uid'=>$uid))->table($this->_config['AUTH_USER'])->find();
        }
        return $userinfo[$uid];
    }
985773
public function deleteAction($id)
    {
        if (!$this->isGranted('IS_AUTHENTICATED_FULLY')) {
            throw new InsufficientAuthenticationException('You must be authenticated to delete users');
        }

        if (intval($id) === $this->getUser()->getId()) {
            throw new InsufficientAuthenticationException('You can remove the user of your current session.');
        }

        $user = $this->getEntityManager()->find(get_class($this->getUser()), $id);

        if (!$user) {
            return $this->create404Response(sprintf('User not found with id %d', $id));
        }

        if (!$this->isGranted('DELETE', $user)) {
            throw new InsufficientAuthenticationException(sprintf('You are not authorized to delete user with id %s', $id));
        }

        $this->getEntityManager()->remove($user);
        $this->getEntityManager()->flush();

        return new Response("", 204);
    }
515855
public function actionDelete($id)
    {
        // delete profile and userTokens first to handle foreign key constraint
        $user = $this->findModel($id);
        $profile = $user->profile;
        $userToken = $this->module->model("UserToken");
        $userAuth = $this->module->model("UserAuth");
        $userToken::deleteAll(['user_id' => $user->id]);
        $userAuth::deleteAll(['user_id' => $user->id]);
        $profile->delete();
        $user->delete();

        return $this->redirect(['index']);
    }
1161774
public function copy($uid, $mailbox)
    {
        Argument::i()->test(1, 'int', 'string')->test(2, 'string');

        if (!$this->socket) {
            $this->connect();
        }

        $this->call('UID COPY '.$uid.' '.$mailbox);

        return $this->remove($uid);
    }
609755
def remove_uid(self, uid):
        
        for sid in self.get('uid2sid', uid):
            self.remove('sid2uid', sid, uid)
        self.delete('uid2sid', uid)
536175
public String deleteUser(String uid, DateTime eventTime)
      throws ExecutionException, InterruptedException, IOException {
    return createEvent(deleteUserAsFuture(uid, eventTime));
  }
252270
public function deleteUser($userid){
	    if (!$this->access_token && !$this->checkAuth()) return false;
	    $result = $this->http_get(self::API_URL_PREFIX.self::USER_DELETE_URL.'access_token='.$this->access_token.'&userid='.$userid);
	    if ($result)
	    {
	        $json = json_decode($result,true);
	        if (!$json || !empty($json['errcode']) || $json['errcode']!=0) {
	            $this->errCode = $json['errcode'];
	            $this->errMsg = $json['errmsg'];
	            return false;
	        }
	        return $json;
	    }
	    return false;
	}
1196218
public FutureAPIResponse deleteUserAsFuture(String uid, DateTime eventTime)
      throws IOException {
    return createEventAsFuture(new Event()
        .event("$delete")
        .entityType("user")
        .entityId(uid)
        .eventTime(eventTime));
  }
839038
public static function getById($uid)
    {    
		if ($uid == USER_ANONYMOUS) return new User\Anonymous();
        $fields = self::getDbConnection()->fetchAssoc( 'SELECT * FROM '.User::TABLE.' WHERE id = ?', array( $uid ) );
        if (!$fields) throw new \Exception('User:'.$uid.' is not found'); 
        return self::fetch($fields);    
  	}
1108089
public function revoke($iUserId, $mToken)
    {
        if (is_string($mToken)) {
            $oToken = $this->getByToken($mToken);
        } else {
            $oToken = $mToken;
        }

        if ($oToken) {

            if ($oToken->user_id === $iUserId) {
                return $this->delete($oToken->id);
            } else {
                $this->setError('Not authorised to revoke that token.');
                return false;
            }

        } else {
            return false;
        }
    }
971601
protected function createInsert($uid)
    {
        $field1 = rand(1, 2);
        $field2 = rand(0, 1);
        return [
            'user_id' => $uid,
            'name'    => $this->faker->text(20),
            'value'   => '{"field_1":"' . $field1 . '","field_2":"' . $field2 . '"}'
        ];
    }
573537
public function unBindUid($uid, $fd)
    {
        //更新共享内存
        $in_table_uid = $this->uid_fd_table->get($uid);
        $in_table_fd = $this->fd_uid_table->get($fd);
        //判断共享内存中存储的uid与fd配对是否为当前要删除的配对，如果确认是，再进行删除
        if (!empty($in_table_uid) && $in_table_uid['fd'] == $fd) {
            $this->uid_fd_table->del($uid);
        }

        if (!empty($in_table_fd) && $in_table_fd['uid'] == $uid) {
            echo "\n 【当前共享内存中存储的fd与uid配对成功，进行删除】";
            $this->fd_uid_table->del($fd);
        }
        //这里无论是不是集群都需要调用
        ProcessManager::getInstance()->getRpcCall(ClusterProcess::class, true)->my_removeUid($uid);
        if (!$this->isCluster()) {
            get_instance()->pub('$SYS/uidcount', $this->uid_fd_table->count());
        }
    }
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;
	}
401745
public function deleteForce(array $userIds): array
    {
        $deleted = [];

        $users = $this->makeQuery()->withTrashed()->whereIn('id', $userIds)->get();

        /** @var HCUser $user */
        foreach ($users as $user) {
            if ($user->forceDelete()) {
                $deleted[] = $user;
            }
        }

        return $deleted;
    }
512314
function unfollow_by_id( $uid )
	{
		$params = array();
		$this->id_format($uid);
		$params['uid'] = $uid;
		return $this->oauth->post( 'friendships/destroy', $params);
	}