mirror of
https://github.com/linuxserver/Heimdall.git
synced 2025-11-20 23:34:54 +09:00
changes
This commit is contained in:
36
vendor/knplabs/github-api/lib/Github/Api/Enterprise/UserAdmin.php
vendored
Normal file
36
vendor/knplabs/github-api/lib/Github/Api/Enterprise/UserAdmin.php
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
<?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');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user