diff --git a/lib/Github/Api/Enterprise.php b/lib/Github/Api/Enterprise.php index 38e7cbff44c..cdb26cd4db0 100644 --- a/lib/Github/Api/Enterprise.php +++ b/lib/Github/Api/Enterprise.php @@ -4,6 +4,7 @@ use Github\Api\Enterprise\Stats; use Github\Api\Enterprise\License; +use Github\Api\Enterprise\Users; /** * Getting information about a GitHub Enterprise instance. @@ -29,4 +30,12 @@ public function license() { return new License($this->client); } + + /** + * @return Users + */ + public function users() + { + return new Users($this->client); + } } diff --git a/lib/Github/Api/Enterprise/Users.php b/lib/Github/Api/Enterprise/Users.php new file mode 100644 index 00000000000..c8cdae43036 --- /dev/null +++ b/lib/Github/Api/Enterprise/Users.php @@ -0,0 +1,28 @@ +put('users/' . rawurlencode($username) . '/suspended'); + } + + /** + * Unsuspend a user + * + * @param string $username the username to unsuspend + */ + public function unsuspend($username) + { + $this->delete('users/' . rawurlencode($username) . '/suspended'); + } +} \ No newline at end of file