From 8ae793542d9b66eff643de8303d707d7219676a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Mennetrier?= Date: Mon, 8 Jan 2024 11:13:27 +0100 Subject: [PATCH] Compare version to use AuthClientService --- Events.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Events.php b/Events.php index 9d41a41..c056a24 100644 --- a/Events.php +++ b/Events.php @@ -26,7 +26,7 @@ public static function onBeforeRequest($event) if ($username != null && $password != null && $identity == null) { $login = new Login; if ($login->load(['username' => $username, 'password' => $password], '') && $login->validate()) { - if (class_exists("AuthClientService")) { + if (version_compare(Yii::$app->version, '1.14', '>=')) { $authClientService = new AuthClientService($login->authClient); $user = $authClientService->getUser(); if ($user == null) {