Answer the question
In order to leave comments, you need to log in
How does the getIsAdmin function work?
Met in dektrium/yii2-user code
public function getIsAdmin()
{
return in_array($this->username, $this->module->admins);
}
Answer the question
In order to leave comments, you need to log in
Nevertheless, the documentation is, initially it is assumed that you will enter an array in the settings in the web.php of the module.
https://github.com/dektrium/yii2-user/blob/master/... (admins)
https://github.com/dektrium/yii2-user/blob/master/...
But sometimes it's more convenient rewrite the rules for accessing the adminController controller of this module in order to distribute rights more flexibly, based on your RBAC system.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question