T
T
tuxx2017-02-09 15:53:20
PHP
tuxx, 2017-02-09 15:53:20

Bitrix admin login tracking via PHP?

How can I track the entrance to the administrative panel through the PHP code without customizing the standard components? The task is to register users. The user writes only his email. The password is generated and sent to the user to the entered email. Some users can be assigned a group that has access to a stripped-down admin panel. For such users, the first time you log into the admin panel, you should be prompted to change the password to your own. They will also need to be reminded to change the password every N months, but I already implement this through custom properties.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Burlaka, 2017-02-09
@AlexeyGfi

Take a look at the events:
dev.1c-bitrix.ru/api_help/main/events/#user
then you can track it anywhere, namely in the admin panel or not - check by the current url.
As an alternative trick, when browsing directories, the .access.php file is always connected from the native folder, the parent folder, and so on up to the root.
/bitrix/admin/.access.php is empty all the way, but it "stumbles" before authorization. You can put a verification code in it. For example, I block my admin panel like this: I check - if the address is opened by an unauthorized one, I knock it out on 404. And the authorization is done in a hidden folder. This is on a site where there are no user profiles, just me, the admin.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question