[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/ -> class-wp-user-meta-session-tokens.php (summary)

Session API: WP_User_Meta_Session_Tokens class

File Size: 133 lines (3 kb)
Included or required: 1 time
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

WP_User_Meta_Session_Tokens:: (8 methods):
  get_sessions()
  prepare_session()
  get_session()
  update_session()
  update_sessions()
  destroy_other_sessions()
  destroy_all_sessions()
  drop_sessions()


Class: WP_User_Meta_Session_Tokens  - X-Ref

Meta-based user sessions token manager.

get_sessions()   X-Ref
Retrieves all sessions of the user.

return: array Sessions of the user.

prepare_session( $session )   X-Ref
Converts an expiration to an array of session information.

param: mixed $session Session or expiration.
return: array Session.

get_session( $verifier )   X-Ref
Retrieves a session based on its verifier (token hash).

param: string $verifier Verifier for the session to retrieve.
return: array|null The session, or null if it does not exist

update_session( $verifier, $session = null )   X-Ref
Updates a session based on its verifier (token hash).

param: string $verifier Verifier for the session to update.
param: array  $session  Optional. Session. Omitting this argument destroys the session.

update_sessions( $sessions )   X-Ref
Updates the user's sessions in the usermeta table.

param: array $sessions Sessions.

destroy_other_sessions( $verifier )   X-Ref
Destroys all sessions for this user, except the single session with the given verifier.

param: string $verifier Verifier of the session to keep.

destroy_all_sessions()   X-Ref
Destroys all session tokens for the user.


drop_sessions()   X-Ref
Destroys all sessions for all users.




Generated : Tue Dec 24 08:20:01 2024 Cross-referenced by PHPXref