Warning: This function has been deprecated. Use WP core methods such as wp_signon(), wp_set_current_user(), and/or wp_set_auth_cookie() instead.
llms_set_person_auth_cookie( int $user_id, bool $remember = false )
Sets user auth cookie by id and records the date/time of the login in the usermeta table
Parameters Parameters
- $user_id
-
(int) (Required) WP_User ID.
- $remember
-
(bool) (Optional) Whether to remember the user.
Default value: false
Return Return
(void)
Source Source
File: includes/functions/llms.functions.person.php
* @param int $user_id WP User ID. * @param int $product_id WP Post ID of the Course or Membership. * @param string $new_status The value to update the new status with after removal is complete. * @param string $trigger Only remove the student if the original enrollment trigger matches the submitted value. * Passing "any" will remove regardless of enrollment trigger. * @return boolean
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
4.5.0 | Use WP core methods such as wp_signon() , wp_set_current_user() , and/or wp_set_auth_cookie() . |
3.36.0 | Pass the $remember param to wp_set_auth_cookie() . |
3.0.0 | Introduced. |