mirror of
https://github.com/bitinflow/accounts.git
synced 2026-03-13 21:45:52 +00:00
Add create user method
This commit is contained in:
@@ -27,7 +27,7 @@ trait SshKeysTrait
|
||||
}
|
||||
|
||||
/**
|
||||
* Get currently authed user with Bearer Token
|
||||
* Creates ssh key for the currently authed user
|
||||
*
|
||||
* @param string $publicKey
|
||||
* @param string|null $name
|
||||
@@ -43,7 +43,7 @@ trait SshKeysTrait
|
||||
}
|
||||
|
||||
/**
|
||||
* Get currently authed user with Bearer Token
|
||||
* Deletes a given ssh key for the currently authed user
|
||||
*
|
||||
* @param int $id
|
||||
*
|
||||
|
||||
@@ -18,6 +18,18 @@ trait UsersTrait
|
||||
*/
|
||||
public function getAuthedUser(): Result
|
||||
{
|
||||
return $this->get('users/me', [], null);
|
||||
return $this->get('users/me');
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new user on behalf of the current user.
|
||||
*
|
||||
* @param array $parameters
|
||||
*
|
||||
* @return Result
|
||||
*/
|
||||
public function createUser(array $parameters): Result
|
||||
{
|
||||
return $this->post('users', $parameters);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user