Skip to content

Commit

Permalink
[10.4] Update Users remove method to add params array to support hard…
Browse files Browse the repository at this point in the history
…_delete (#607)


Co-authored-by: Jeff Martin <[email protected]>
  • Loading branch information
jeffersonmartin and Jeff Martin authored Dec 21, 2020
1 parent 3ca30a4 commit 5100459
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
[10.4.0]: https://github.com/GitLabPHP/Client/compare/10.3.1...10.4.0

* Add min_access_level option to group search
* Added params array to remove user method to support hard_delete

## [10.3.1] - 2020-12-04

Expand Down
11 changes: 8 additions & 3 deletions src/Api/Users.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,13 +181,18 @@ public function update(int $id, array $params, array $files = [])
}

/**
* @param int $id
* @param int $id
* @param array $params {
*
* @var bool $hard_delete If true, contributions that would usually be moved to the ghost user are
* deleted instead, as well as groups owned solely by this user.
* }
*
* @return mixed
*/
public function remove(int $id)
public function remove(int $id, array $params = [])
{
return $this->delete('users/'.self::encodePath($id));
return $this->delete('users/'.self::encodePath($id), $params);
}

/**
Expand Down

0 comments on commit 5100459

Please sign in to comment.