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


Top ↑

Return Return

(void)


Top ↑

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

Top ↑

Changelog 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.

Top ↑

User Contributed Notes User Contributed Notes

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