From 2ab290c712129dff5bd6f56bbfadf7c465590f62 Mon Sep 17 00:00:00 2001 From: Max Nuding Date: Tue, 20 May 2025 20:31:04 +0200 Subject: [PATCH] allow username in getUser --- src/APnutI.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/APnutI.php b/src/APnutI.php index 8507746..642b00c 100644 --- a/src/APnutI.php +++ b/src/APnutI.php @@ -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); }