Answer the question
In order to leave comments, you need to log in
How to restrict access to certain sections of the site? And how to make user groups?
For example, so that those who are not authorized and not in the admin group would not have access to the admin panel. And how to set up user groups?
Answer the question
In order to leave comments, you need to log in
Admin check:
Authorization check:
If the user is not an admin or is not authorized, then he is redirected to the main page.
Substitute your data accordingly and that's it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question