G
G
German Jet2016-06-13 20:03:47
Yii
German Jet, 2016-06-13 20:03:47

How to organize a user's personal account in yii2?

Do I understand correctly that in the advanced template, the backend part is only for the administrator? Or is it possible to separate the public part of the site and the personal user accounts in this way? In django, for example, there is a login_required decorator, with which I could close any controller action, so the controller could contain both front-end and back-end functions (I hope I made myself clear). Is there something similar in yii2? Also, on Codeigniter, my personal account was located at domen.com/cp, and in the base controller I checked the address for the content of the cp string and, if so, required authorization. Maybe in yii2 you can do it this way? And in general, what other options for creating personal user accounts?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dmirogin, 2016-06-13
@GeraJet


Do I understand correctly that in the advanced template, the backend part is only for the administrator? Or is it possible to separate the public part of the site and the personal user accounts in this way?
Using the yii\filters\AccessControl filter and creating additional roles, you can restrict access.
More about rbac in yii2 www.yiiframework.com/doc-2.0/guide-security-author...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question