WordPress at a glance
function is not described

WP_User_Meta_Session_Tokens::update_session() WP 4.0.0

Updates a session based on its verifier (token hash).

This is a method of the class: WP_User_Meta_Session_Tokens

No Hooks.


Null. Nothing.


$WP_User_Meta_Session_Tokens = new WP_User_Meta_Session_Tokens();
$var = $WP_User_Meta_Session_Tokens->update_session( $verifier, $session );
$verifier(string) (required)
Verifier for the session to update.
Session. Omitting this argument destroys the session.
Default: null


Since 4.0.0 Introduced.

Code of WP User Meta Session Tokens::update session: wp-includes/class-wp-user-meta-session-tokens.php WP 5.2.2

protected function update_session( $verifier, $session = null ) {
	$sessions = $this->get_sessions();

	if ( $session ) {
		$sessions[ $verifier ] = $session;
	} else {
		unset( $sessions[ $verifier ] );

	$this->update_sessions( $sessions );