wp_session_regenerate_id

Regenerate the session ID.

Description

wp_session_regenerate_id( (bool) $delete_old_session = false ); 

Parameters (1)

0. $delete_old_session — Optional. (bool) => false
The delete old session.

Usage

  1. if ( !function_exists( 'wp_session_regenerate_id' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'ninja-forms/deprecated/includes/libraries/wp-session.php'; 
  3.  
  4. // The delete old session. 
  5. $delete_old_session = false; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = wp_session_regenerate_id($delete_old_session); 
  9.  

Defined (2)

The function is defined in the following location(s).

/deprecated/includes/libraries/wp-session.php  
  1. function wp_session_regenerate_id( $delete_old_session = false ) { 
  2. $wp_session = WP_Session::get_instance(); 
  3.  
  4. $wp_session->regenerate_id( $delete_old_session ); 
  5.  
  6. return true; 
/includes/Libraries/Session/wp-session.php  
  1. function wp_session_regenerate_id( $delete_old_session = false ) { 
  2. $wp_session = WP_Session::get_instance(); 
  3.  
  4. $wp_session->regenerate_id( $delete_old_session ); 
  5.  
  6. return true;