expusersession
Available since Exponential 6.0.15 (in development, not in a release yet).
Summary
One sign-in of a user (table expuser_session): when it started and was last used, from where (the address as the request gave it), with what (the User-Agent header and what it names), how (the sign-in method, Remember me) and, once it is over, when and why it ended (signed out, revoked by the user ...
Description
One sign-in of a user (table expuser_session): when it started and was last used, from where (the address as the request gave it), with what (the User-Agent header and what it names), how (the sign-in method, Remember me) and, once it is over, when and why it ended (signed out, revoked by the user or an administrator, replaced, expired).
The row is found by the hash (SHA-256) of a random token kept in the session itself (expUserSessionTracker:: SESSION_KEY); neither the token nor the session id is stored. A session whose row is ended or gone is signed out on its next request, whatever session handler the site uses. See expUserSessionTracker.
@since 6.0.15
Persistent
Yes. Table expuser_session.
Attributes
| Attribute | Type | Static* |
|---|---|---|
| id | integer | Yes. |
| user_id | integer | Yes. |
| token_hash | string | Yes. |
| created | integer | Yes. |
| last_active | integer | Yes. |
| first_ip | string | Yes. |
| last_ip | string | Yes. |
| user_agent | string | Yes. |
| browser | string | Yes. |
| os | string | Yes. |
| device_type | string | Yes. |
| method | string | Yes. |
| remember_until | integer | Yes. |
| siteaccess | string | Yes. |
| ended | integer | Yes. |
| ended_by | integer | Yes. |
| end_reason | string | Yes. |
| is_active | - | No. |
| parsed | - | No. |
| approximate_ip | - | No. |
| approximate_first_ip | - | No. |
| label | - | No. |
* Yes: a field of the table (a stored value); No: a function attribute, computed when it is asked for.
Source
kernel/classes/user/expusersession.php, expUserSession::definition()
Added to the reference for Exponential 6.0.15: the 4.x reference had no page for this object.
Contributors
- Graham Brookins Updated
Comments
Add a comment