apply_filters( ‘determine_current_user’, int|false $user_id )

In this article

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.

Source

$user_id = apply_filters( 'determine_current_user', false );

Changelog

VersionDescription
3.9.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.