diff --git a/framework/web/User.php b/framework/web/User.php index 086b3c5dc63..5f80fc8bcd4 100644 --- a/framework/web/User.php +++ b/framework/web/User.php @@ -788,20 +788,6 @@ public function checkRedirectAcceptable() return false; } - /** - * Returns auth manager associated with the user component. - * - * By default this is the `authManager` application component. - * You may override this method to return a different auth manager instance if needed. - * @return \yii\rbac\ManagerInterface - * @since 2.0.6 - * @deprecated since version 2.0.9, to be removed in 2.1. Use [[getAccessChecker()]] instead. - */ - protected function getAuthManager() - { - return Yii::$app->getAuthManager(); - } - /** * Returns the access checker used for checking access. * @return CheckAccessInterface @@ -809,6 +795,6 @@ protected function getAuthManager() */ protected function getAccessChecker() { - return $this->accessChecker !== null ? $this->accessChecker : $this->getAuthManager(); + return $this->accessChecker !== null ? $this->accessChecker : Yii::$app->getAuthManager(); } }