wppaste
WordPress

apply_filters( 'determine_current_user', int|false $user_id )

Since
3.9.0
Filters the current user.

Description

The default filters use this to determine the current user from the request's cookies, if available. Returning a value of false will effectively short-circuit setting the current user.

Parameters

$user_idint|false
User ID if one has been determined, false otherwise.

Fired at · 1

  • wp-includes/user.php:3753_wp_get_current_user()

Source

	 * the current user.	 *	 * @since 3.9.0	 *	 * @param int|false $user_id User ID if one has been determined, false otherwise.	 */	$user_id = apply_filters( 'determine_current_user', false );	if ( ! $user_id ) {		wp_set_current_user( 0 );		return $current_user;	} 	wp_set_current_user( $user_id );

History

Introduced in 3.9.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 6.8.8 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.