Answer the question
In order to leave comments, you need to log in
How to make a login history on 1C-Bitrix?
There was a need to make a login history for the user.
Country, City, System from which the login was made, date and time of entry, ip, status (online/offline).
As well as the ability to log out all authorizations or one of the authorizations.
How can this be done on Bitrix? Or in php?
I'm more interested in how to log out a specific session.
Answer the question
In order to leave comments, you need to log in
it is unlikely to be able to log out someone else's session, because during logout, authorization cookies and parameters are deleted from the session (as well as from the database). Listing of the Logout function .
With the login history, it is easier, as an option, to store the history in the info block. Data can be taken by means of the module ala Geo IP.
You can remember authorization through the
PS event . I found a module that can log out, so you can do something like that. You can just see what's inside the module :)
There was a need to make a login history for the user.
Country, City, System from which the login was made, date and time of entry, ip, status (online/offline).
There is an event table in Bitrix /bitrix/admin/event_log.php There is a "successful login" event. If your code doesn't generate it, you can log it manually.
And then display all the data from there with this API https://dev.1c-bitrix.ru/api_help/main/reference/c...
Well, or you can construct requests yourself through https://dev.1c-bitrix.ru /api_help/main/reference/c...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question