T
T
Tarrissarh2018-08-06 16:11:32
1C-Bitrix
Tarrissarh, 2018-08-06 16:11:32

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

3 answer(s)
N
Nikita, 2018-08-06
@Rema1ns

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 :)

A
Alexey Emelyanov, 2018-08-06
@babarun

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).

See web analytics module. Plus, add labels on the login / logout event

M
Maxim Morozov, 2018-08-09
@murzix

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 question

Ask a Question

731 491 924 answers to any question