You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
785 B

6 years ago
<?php
namespace Github\Api\Enterprise;
use Github\Api\AbstractApi;
class UserAdmin extends AbstractApi
{
/**
* Suspend a user.
*
* @link https://developer.github.com/v3/users/administration/#suspend-a-user
*
* @param string $username
*
* @return array
*/
public function suspend($username)
{
return $this->put('/users/'.rawurldecode($username).'/suspended', ['Content-Length' => 0]);
}
/**
* Unsuspend a user.
*
* @link https://developer.github.com/v3/users/administration/#unsuspend-a-user
*
* @param string $username
*
* @return array
*/
public function unsuspend($username)
{
return $this->delete('/users/'.rawurldecode($username).'/suspended');
}
}