allow username in getUser

This commit is contained in:
2025-05-20 20:31:04 +02:00
parent b18e2ceea2
commit 2ab290c712

View File

@ -662,7 +662,8 @@ class APnutI
return $this->current_user; 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); return new User($this->get('/users/' . $user_id, $args), $this);
} }