Glossary Term
wp_signon()
wp_signon() — Authenticates and logs a user in with ‘remember’ capability. The credentials is an array that has ‘user_login’, ‘user_password’, and ‘remember’ indices. If the credentials is not given, then the log in form will be assumed and used if set. The various authentication cookies will be set by this function and will be set for a longer period depending on if the ‘remember’ credential is set to true. Note: wp_signon() doesn’t handle setting the current user. This means that if the function is called before the ‘init’ hook is fired, is_user_logged_in() will evaluate as false until that point.
Inputs: $credentials (array): Optional. User info in order to sign on. Field $user_login (string): Username. Field $user_password (string): User password. Field $remember (bool): Whether to ‘remember’ the user. Increases the time that the cookie will be kept. Default false. $secure_cookie (string|bool): Optional. Whether to use secure cookie.
Returns WP_User|WP_Error: WP_User on success, WP_Error on failure.
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…
