Delete the user with the specified ID.

@param sUserID
The ID of the user to delete
@return {@link EChange#CHANGED} if the user was deleted,
{@link EChange#UNCHANGED} otherwise.
549634
@Nonnull
  public EChange deleteUser (@Nullable final String sUserID)
  {
    final User aUser = getOfID (sUserID);
    if (aUser == null)
    {
      AuditHelper.onAuditDeleteFailure (User.OT, "no-such-user-id", sUserID);
      return EChange.UNCHANGED;
    }

    m_aRWLock.writeLock ().lock ();
    try
    {
      if (BusinessObjectHelper.setDeletionNow (aUser).isUnchanged ())
      {
        AuditHelper.onAuditDeleteFailure (User.OT, "already-deleted", sUserID);
        return EChange.UNCHANGED;
      }
      internalMarkItemDeleted (aUser);
    }
    finally
    {
      m_aRWLock.writeLock ().unlock ();
    }
    AuditHelper.onAuditDeleteSuccess (User.OT, sUserID);

    // Execute callback as the very last action
    m_aCallbacks.forEach (aCB -> aCB.onUserDeleted (aUser));

    return EChange.CHANGED;
  }
348775
public int remove(CmsUUID id) {

        CmsDetailPageInfo info = m_infoById.get(id);
        if (info == null) {
            throw new IllegalArgumentException();
        }
        String type = info.getType();
        List<CmsDetailPageInfo> infos = m_map.get(type);
        int pos = infos.indexOf(info);
        infos.remove(pos);
        m_infoById.remove(id);
        return pos;

    }
385427
@Nonnull
  @ReturnsMutableCopy
  public ICommonsList <IUserGroup> getAllUserGroupsWithAssignedUser (@Nullable final String sUserID)
  {
    if (StringHelper.hasNoText (sUserID))
      return new CommonsArrayList <> ();

    return getAll (aUserGroup -> aUserGroup.containsUserID (sUserID));
  }
828708
public synchronized void remove(int requestId)
   {
		if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "remove");
		
      if (!containsId(requestId))
      {
         if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) debugTraceTable("id ("+requestId+") not in table");
         throw new SIErrorException(nls.getFormattedMessage("REQIDTABLE_INTERNAL_SICJ0058", null, "REQIDTABLE_INTERNAL_SICJ0058")); // D226223
      }

      testReqIdTableEntry.requestId = requestId;
      table.remove(testReqIdTableEntry);

		if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "remove");
   }
815807
@Nonnull
  public EChange logoutUser (@Nullable final String sUserID)
  {
    LoginInfo aInfo;
    m_aRWLock.writeLock ().lock ();
    try
    {
      aInfo = m_aLoggedInUsers.remove (sUserID);
      if (aInfo == null)
      {
        AuditHelper.onAuditExecuteSuccess ("logout", sUserID, "user-not-logged-in");
        return EChange.UNCHANGED;
      }

      // Ensure that the SessionUser is empty. This is only relevant if user is
      // manually logged out without destructing the underlying session
      final InternalSessionUserHolder aSUH = InternalSessionUserHolder._getInstanceIfInstantiatedInScope (aInfo.getSessionScope ());
      if (aSUH != null)
        aSUH._reset ();

      // Set logout time - in case somebody has a strong reference to the
      // LoginInfo object
      aInfo.setLogoutDTNow ();
    }
    finally
    {
      m_aRWLock.writeLock ().unlock ();
    }

    if (LOGGER.isInfoEnabled ())
      LOGGER.info ("Logged out " +
                   _getUserIDLogText (sUserID) +
                   " after " +
                   Duration.between (aInfo.getLoginDT (), aInfo.getLogoutDT ()).toString ());
    AuditHelper.onAuditExecuteSuccess ("logout", sUserID);

    // Execute callback as the very last action
    m_aUserLogoutCallbacks.forEach (aCB -> aCB.onUserLogout (aInfo));

    return EChange.CHANGED;
  }
614638
public Response deleteUser(String username) {
		return restClient.delete("users/" + username, new HashMap<String, String>());
	}
1080092
@Nonnull
  public EChange setUserPassword (@Nullable final String sUserID, @Nonnull final String sNewPlainTextPassword)
  {
    // Resolve user
    final User aUser = getOfID (sUserID);
    if (aUser == null)
    {
      AuditHelper.onAuditModifyFailure (User.OT, sUserID, "no-such-user-id", "password");
      return EChange.UNCHANGED;
    }

    // Create a new password salt upon password change
    final PasswordHash aPasswordHash = GlobalPasswordSettings.createUserDefaultPasswordHash (new PasswordSalt (),
                                                                                             sNewPlainTextPassword);
    m_aRWLock.writeLock ().lock ();
    try
    {
      final EChange eChange = aUser.setPasswordHash (aPasswordHash);
      if (eChange.isUnchanged ())
        return EChange.UNCHANGED;

      BusinessObjectHelper.setLastModificationNow (aUser);
      internalUpdateItem (aUser);
    }
    finally
    {
      m_aRWLock.writeLock ().unlock ();
    }
    AuditHelper.onAuditModifySuccess (User.OT, "password", sUserID);

    // Execute callback as the very last action
    m_aCallbacks.forEach (aCB -> aCB.onUserPasswordChanged (aUser));

    return EChange.CHANGED;
  }
1340735
private void remove(final String id, final StringBuilder sql) {
        sql.append("DELETE FROM ").append(getName()).append(" WHERE ").append(JdbcRepositories.getDefaultKeyName()).append(" = '").
                append(id).append("'");
    }
14648
@Override
	public synchronized USER remove(final ID sessionId)
	{
		sessionIdToSession.remove(sessionId);
		return super.remove(sessionId);
	}
421390
@Nonnull
  @ReturnsMutableCopy
  public ICommonsList <String> getAllUserGroupIDsWithAssignedUser (@Nullable final String sUserID)
  {
    if (StringHelper.hasNoText (sUserID))
      return new CommonsArrayList <> ();

    return getAllMapped (aUserGroup -> aUserGroup.containsUserID (sUserID), aUserGroup -> aUserGroup.getID ());
  }
534241
def delete(self, id):
        
        url = self._url('%s' % (id))
        return self.client.delete(url)
338553
@Path("/{roleName}/users/{cuid}")
    @ApiOperation(value="Delete a role or remove a user from a role",
        notes="If users/{cuid} is present, user is removed from role.", response=StatusMessage.class)
    public JSONObject delete(String path, JSONObject content, Map<String,String> headers)
    throws ServiceException, JSONException {
        String name = getSegment(path, 1);
        String rel = getSegment(path, 2);

        UserServices userServices = ServiceLocator.getUserServices();
        try {
            if (rel == null) {
                userServices.deleteRole(name);
              }
              else if (rel.equals("users")) {
                  String cuid = getSegment(path, 3);
                  userServices.removeUserFromRole(cuid, name);
              }
        }
        catch (DataAccessException ex) {
            throw new ServiceException(HTTP_500_INTERNAL_ERROR, ex.getMessage(), ex);
        }
        return null;
    }
1000247
@Nonnull
  public EChange unassignUserFromAllUserGroups (@Nullable final String sUserID)
  {
    if (StringHelper.hasNoText (sUserID))
      return EChange.UNCHANGED;

    final ICommonsList <IUserGroup> aAffectedUserGroups = new CommonsArrayList <> ();
    m_aRWLock.writeLock ().lock ();
    try
    {
      EChange eChange = EChange.UNCHANGED;
      for (final UserGroup aUserGroup : internalDirectGetAll ())
        if (aUserGroup.unassignUser (sUserID).isChanged ())
        {
          aAffectedUserGroups.add (aUserGroup);
          BusinessObjectHelper.setLastModificationNow (aUserGroup);
          internalUpdateItem (aUserGroup);
          eChange = EChange.CHANGED;
        }
      if (eChange.isUnchanged ())
        return EChange.UNCHANGED;

    }
    finally
    {
      m_aRWLock.writeLock ().unlock ();
    }
    AuditHelper.onAuditModifySuccess (UserGroup.OT, "unassign-user-from-all-usergroups", sUserID);

    // Execute callback as the very last action
    for (final IUserGroup aUserGroup : aAffectedUserGroups)
      m_aCallbacks.forEach (aCB -> aCB.onUserGroupUserAssignment (aUserGroup, sUserID, false));

    return EChange.CHANGED;
  }

  /**
   * Check if the passed user is assigned to the specified user group
   *
   * @param sUserGroupID
   *        ID of the user group to check
   * @param sUserID
   *        ID of the user to be checked.
   * @return <code>true</code> if the specified user is assigned to the
   *         specified user group.
   */
  public boolean isUserAssignedToUserGroup (@Nullable final String sUserGroupID, @Nullable final String sUserID)
  {
    if (StringHelper.hasNoText (sUserID))
      return false;

    final IUserGroup aUserGroup = getOfID (sUserGroupID);
    return aUserGroup == null ? false : aUserGroup.containsUserID (sUserID);
  }
833911
public function deleteUser($id)
    {
        $user = $this->getRepository()->find($id);

        if (!$user) {
            $this->app['logger.flash']->warning(Trans::__('general.phrase.user-not-exist'));

            return false;
        }

        $userId = $user->getId();
        if ($result = $this->getRepository()->delete($user)) {
            /** @var Repository\AuthtokenRepository $authtokenRepository */
            $authtokenRepository = $this->app['storage']->getRepository(Entity\Authtoken::class);
            $authtokenRepository->deleteTokens($userId);
        }

        return $result;
    }
453388
public QYResultType delete(Integer id){
        BeanUtil.requireNonNull(id, "id is null");
        String url = BASE_API_URL + "cgi-bin/department/delete?access_token=#&id=" + id;
        BaseResponse r = executeGet(url);
        return QYResultType.get(r.getErrcode());
    }
335863
public int deleteByIdCascade(String id, boolean userTable)
			throws SQLException {
		int count = 0;
		if (id != null) {
			Contents contents = queryForId(id);
			if (contents != null) {
				count = deleteCascade(contents, userTable);
			} else if (userTable) {
				dropTable(id);
			}
		}
		return count;
	}
461364
@Nonnull
  public EChange disableUser (@Nullable final String sUserID)
  {
    final User aUser = getOfID (sUserID);
    if (aUser == null)
    {
      AuditHelper.onAuditModifyFailure (User.OT, sUserID, "no-such-user-id", "disable");
      return EChange.UNCHANGED;
    }

    m_aRWLock.writeLock ().lock ();
    try
    {
      if (aUser.setDisabled (true).isUnchanged ())
        return EChange.UNCHANGED;
      internalUpdateItem (aUser);
    }
    finally
    {
      m_aRWLock.writeLock ().unlock ();
    }
    AuditHelper.onAuditModifySuccess (User.OT, "disable", sUserID);

    // Execute callback as the very last action
    m_aCallbacks.forEach (aCB -> aCB.onUserEnabled (aUser, false));

    return EChange.CHANGED;
  }