Glossary Term
wp_set_current_user()
3 tags
1 category
wp_set_current_user() — Changes the current user by ID or name. Set $id to null and specify a name if you do not know a user’s ID. Some WordPress functionality is based on the current user and not based on the signed in user. Therefore, it opens the ability to edit and perform actions on users who aren’t signed in.
Inputs: $id (int|null): User ID. $name (string): User’s username.
Returns WP_User: Current user User object.
Term Connections
Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.
Loading term connections…
