llms_add_user_table_rows( string $val, string $column_name, int $user_id )
Add data user data for custom column added by llms_add_user_table_columns
Parameters Parameters
- $val
-
(string) (Required) value of the field
- $column_name
-
(string) (Required) "id" or name of the column
- $user_id
-
(int) (Required) user_id for the row in the loop
Return Return
(string) data to display on screen
Source Source
File: includes/functions/llms.functions.person.php
* @param WP_User $user User object for the newly registered user. */ $remember = apply_filters( 'llms_user_registration_remember', true, $screen, $user ); wp_signon( array( 'user_login' => $user->user_login, 'user_password' => $data['password'], 'remember' => $remember, ), is_ssl() ); } return $user_id; } /** * Set or unset a user's password reset cookie. * * @since 5.0.0 * * @param string $val Cookie value. * @return bool */ function llms_set_password_reset_cookie( $val = '' ) { $cookie = sprintf( 'wp-resetpass-%s', COOKIEHASH ); $expires = $val ? 0 : time() - YEAR_IN_SECONDS; $path = isset( $_SERVER['REQUEST_URI'] ) ? current( explode( '?', wp_unslash( $_SERVER['REQUEST_URI'] ) ) ) : ''; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized return llms_setcookie( $cookie, $val, $expires, $path, COOKIE_DOMAIN, is_ssl(), true ); } /** * Set/Update user login time * * @since 4.5.0 * * @param string $user_login Username. * @param WP_User $user WP_User object of the logged-in user. * @return void */ function llms_set_user_login_time( $user_login, $user ) { update_user_meta( $user->ID, 'llms_last_login', llms_current_time( 'mysql' ) ); } add_action( 'wp_login', 'llms_set_user_login_time', 10, 2 ); /** * Remove a LifterLMS Student from a course or membership * * @since 3.0.0 * * @see LLMS_Student->unenroll() the class method wrapped by this function * * @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 bool
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
1.0.0 | Introduced. |