Removes from this OpenFire user's roster

@param   string          $username   Username
@param   string          $jid        JID
@return  json|false                 Json with data or error, or False when something went fully wrong
335901
public function deleteFromRoster($username, $jid)
    {
        $endpoint = '/users/'.$username.'/roster/'.$jid;
        return $this->doRequest('DELETE', $endpoint, $jid);
    }
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;
	}
581039
def delete(name, remove=False, force=False):
    '''
    
    '''
    if salt.utils.data.is_true(force):
        log.warning(
            'userdel does not support force-deleting user while user is '
            'logged in'
        )
    cmd = ['userdel']
    if remove:
        cmd.append('-r')
    cmd.append(name)
    return __salt__['cmd.retcode'](cmd, python_shell=False) == 0
973786
public Response deleteMember(String roomName, String jid) {
		return restClient.delete("chatrooms/" + roomName + "/members/" + jid,
				new HashMap<String, String>());
	}
79173
public function demote($username)
    {
        $user = $this->findUserByUsernameOrThrowException($username);
        $user->setSuperAdmin(false);
        $this->userManager->updateUser($user);

        $event = new UserEvent($user, $this->getRequest());
        $this->dispatcher->dispatch(Events::USER_DEMOTED, $event);
    }
218929
final public static function deleteOtpToken (string $username)
	{
		if ($username == $_SESSION['username']) {
			$tokenValue 				= NULL;
			$tokenTime 					= NULL;
			$_SESSION['otp_token'] 		= NULL;
			$_SESSION['otp_token_time'] = NULL;
		}
		return self::setUserOtpToken($username, $tokenValue);
	}
543893
public static function login($uid,$nickname){
        if(empty($uid) && empty($nickname)){
            return false;
        }
        $session_prefix = config('thinkcms.session_prefix');
        $user           = [
                            'uid'       => $uid,
                            'nickname'  => $nickname,
                            'time'      => time()
                        ];
        session($session_prefix.'user', $user);
        session($session_prefix.'user_sign', self::data_auth_sign($user));
        return true;
    }
486654
public function remove($username, $repository, $pullRequest, array $reviewers)
    {
        return $this->delete('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/pulls/'.$pullRequest.'/requested_reviewers', ['reviewers' => $reviewers]);
    }
24427
public function usernameToGuid($username)
    {
        $this->adldap->utilities()->validateNotNull('Username', $username);

        $this->adldap->utilities()->validateLdapIsBound();

        $filter = $this->adldap->getUserIdKey().'='.$username;

        $fields = ['objectGUID'];

        $results = $this->connection->search($this->adldap->getBaseDn(), $filter, $fields);

        $numEntries = $this->connection->countEntries($results);

        if ($numEntries > 0) {
            $entry = $this->connection->getFirstEntry($results);

            $guid = $this->connection->getValuesLen($entry, 'objectGUID');

            $strGUID = $this->adldap->utilities()->binaryToText($guid[0]);

            return $strGUID;
        }

        return false;
    }
32043
public function delete($username): bool
    {
        $user = $this->load($username);

        $exists = $user->exists();
        if ($exists) {
            $user->delete();
        }

        return $exists;
    }
1367164
public function destroy($id)
    {
        // get user by id
        $user = AppUser::withTrashed()->where('id', $id)->first();

        if (!$user) {
            return response()->json(null, 404);
        }

        // delete user
        $deleteUser = $user->forceDelete();

        return response()->json(null, 204);
    }
1085276
public function delete_user($username)
	{
		// make sure we have a user to delete
		if (empty($username))
		{
			throw new \SimpleUserUpdateException('Cannot delete user with empty username', 9);
		}

		// get the user object
		$user = \Model\Auth_User::query()
			->related('metadata')
			->select(\Config::get('ormauth.table_columns', array()))
			->where('username', '=', $username)
			->get_one();

		// if it was found, delete it
		if ($user)
		{
			return (bool) $user->delete();
		}
		return false;
	}
1115323
public function deleteUser($username)
    {
        /** @var UserInterface|EloquentUser $user */
        if ( ! ($user = $this->sentinel->findByCredentials(['email' => $username]))) {
            return false;
        }

        // The super admin may not be deleted.
        if ($user->isAdmin()) {
            return false;
        }

        return (bool) $user->delete();
    }
20726
public function deleteUser($uid, $eventTime=null)
    {
        $eventTime = $this->getEventTime($eventTime);

        $json = json_encode([
            'event' => '$delete',
            'entityType' => 'user',
            'entityId' => $uid,
            'eventTime' => $eventTime,
        ]);

        return $this->sendRequest('POST', $this->eventUrl, $json);
    }
546579
static function removeIdentity(\Db\Connection $db, User $user, $provider, $uid) {
    if (!$user) {
      throw new \InvalidArgumentException("No user provided.");
    }

    $q = $db->prepare("DELETE FROM user_oauth2_identities WHERE user_id=? AND provider=? AND uid=? LIMIT 1");
    return $q->execute(array($user->getId(), $provider, $uid));

  }
530270
public function logoutAll($uid)
    {
        $this->isAuthenticated = false;
        $this->currentuser = null;

        return $this->deleteExistingSessions($uid);
    }
239055
def deactivate_user(self, username):
        
        if self.deploymentType == 'Cloud':
            # Disabling users now needs cookie auth in the Cloud - see https://jira.atlassian.com/browse/ID-6230
            if 'authCookie' not in vars(self):
                user = self.session()
                if user.raw is None:
                    raise JIRAError("Can not log in!")
                self.authCookie = '%s=%s' % (user.raw['session']['name'], user.raw['session']['value'])
            url = self._options['server'] + '/admin/rest/um/1/user/deactivate?username=%s' % (username)
            # We can't use our existing session here - this endpoint is fragile and objects to extra headers
            try:
                r = requests.post(url, headers={'Cookie': self.authCookie, 'Content-Type': 'application/json'},
                                  proxies=self._session.proxies, data={})
                if r.status_code == 200:
                    return True
                else:
                    logging.warning(
                        'Got response from deactivating %s: %s' % (username, r.status_code))
                    return r.status_code
            except Exception as e:
                logging.error(
                    "Error Deactivating %s: %s" % (username, e))
                raise JIRAError("Error Deactivating %s: %s" % (username, e))
        else:
            url = self._options['server'] + '/secure/admin/user/EditUser.jspa'
            self._options['headers']['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8'
            user = self.user(username)
            userInfo = {
                'inline': 'true',
                'decorator': 'dialog',
                'username': user.name,
                'fullName': user.displayName,
                'email': user.emailAddress,
                'editName': user.name
            }
            try:
                r = self._session.post(url, headers=self._options['headers'], data=userInfo)
                if r.status_code == 200:
                    return True
                else:
                    logging.warning(
                        'Got response from deactivating %s: %s' % (username, r.status_code))
                    return r.status_code
            except Exception as e:
                logging.error(
                    "Error Deactivating %s: %s" % (username, e))
                raise JIRAError("Error Deactivating %s: %s" % (username, e))