diff --git a/controllers/user/UserController.php b/controllers/user/UserController.php index 9c519c9..df1b290 100644 --- a/controllers/user/UserController.php +++ b/controllers/user/UserController.php @@ -93,7 +93,12 @@ public function actionGetByEmail($email) */ public function actionGetByAuthclient($name, $id) { - $user = User::findOne(['auth_mode' => $name, 'authclient_id' => $id]); + $user = User::find() + ->alias('u') + ->joinWith('auths a', false) + ->where(['u.auth_mode' => $name, 'u.authclient_id' => $id]) + ->orWhere(['a.source' => $name, 'a.source_id' => $id]) + ->one(); if ($user === null) { return $this->returnError(404, 'User not found!'); diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index f838ef9..3f14602 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,8 +1,9 @@ Changelog ========= -0.10.4 (Unreleased) ---------------------------- +0.10.4 (September 9, 2024) +-------------------------- +- Enh #180: Improved `user/get-by-authclient` endpoint to support additional authentication clients. - Enh #181: Added user profile `image_url` and `banner_url` - Enh #179: Added new `resend` and `cancel` endpoints for user invite