determine_current_user

determine_current_user

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.7

apply_filters('determine_current_user') is found 1 times:

  • /wp-includes/user.php line 3688
    	 * @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 );
    

See this hook used in plugins: