allow username in getUser

This commit is contained in:
Max Nuding 2025-05-20 20:31:04 +02:00
parent b18e2ceea2
commit 2ab290c712
Signed by: phlaym
SSH Key Fingerprint: SHA256:mionmF+5trOUI1AxqzAU1ZK3tv6IiDcdKGXcMWwa1nQ

View File

@ -662,7 +662,8 @@ class APnutI
return $this->current_user;
}
public function getUser(int $user_id, array $args = [])
// User ID or user name
public function getUser(int|string $user_id, array $args = [])
{
return new User($this->get('/users/' . $user_id, $args), $this);
}