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) {