Skip to content

Commit

Permalink
Merge pull request #19972 from terabytesoftw/remove-deprecated-method…
Browse files Browse the repository at this point in the history
…-user

Remove deprecated methods to `User::class`.
  • Loading branch information
bizley authored Sep 23, 2023
2 parents 21cc6ad + 12591df commit ce68c7e
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions framework/web/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -788,27 +788,13 @@ 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
* @since 2.0.9
*/
protected function getAccessChecker()
{
return $this->accessChecker !== null ? $this->accessChecker : $this->getAuthManager();
return $this->accessChecker !== null ? $this->accessChecker : Yii::$app->getAuthManager();
}
}

0 comments on commit ce68c7e

Please sign in to comment.