Tag Archives | members

Function Reference: wlmapi_is_user_a_member

Checks if the specified member belongs to the specified level. Parameters level_id (int) – The ID of the level to check member_id (int) – The ID of the member to check Return Returns TRUE if the user belongs to the level and FALSE if not. Example Code <?php $check = wlmapi_is_user_a_member(1340726008, 1); if ( $check ) […]

Function Reference: wlmapi_delete_member

Deletes an existing member. Parameters member_id (int) – The ID of the member to delete Return Returns a multi-dimensional array containing the operation status. Example Code <?php $member = wlmapi_delete_member(13); print_r($member); ?> Example Output Array ( [success] => 1 [supported_verbs] => Array ( [0] => GET [1] => PUT [2] => DELETE ) ) Notes This […]

Function Reference: wlmapi_update_member

Updates a member according to the specified arguments. Parameters user_id (int) – The ID of the member to update args (array) – An array of accepted arguments specified below: Parameter Description Required Default user_login (string) User login (username) Required user_email (string) User’s email address Required user_pass (string) Password. Auto-generated if not specified Optional  auto-generated company (string) Company name Optional address1 (string) […]

Function Reference: wlmapi_get_member_levels

Retrieves the membership levels that the specified user belongs to. Parameters member_id (int) – The ID of the member Return Returns a multi-dimensional array containing data for the levels that the  specified member belongs to. Example Code <?php $levels = wlmapi_get_member_levels(1); print_r($levels); ?> Example Output Array ( [1340726008] => stdClass Object ( [Level_ID] => 1340726008 [Name] […]

Function Reference: wlmapi_get_member

Retrieves all information about the specified member. Parameters member_id (int) – The ID of the member to retrieve Return Returns a multi-dimensional array containing data for the specified member. Example Code <?php $member = wlmapi_get_member(1); print_r($member); ?> Example Output Array ( [success] => 1 [member] => Array ( [0] => Array ( [ID] => 1 […]

Function Reference: wlmapi_add_member

Adds a member to WordPress according to the specified arguments. Parameters args (array) – An array of accepted arguments specified below: Parameter Description Required Default user_login (string) User login (username) Required user_email (string) User’s email address Required user_pass (string) Password. Auto-generated if not specified Optional  auto-generated company (string) Company name Optional address1 (string) Address line #1 Optional address2 (string) Address line #2 […]

Function Reference: wlmapi_the_members

Retrieves a list of all members passed through the filter: wlmapi_the_members. If no filter is applied, this function will return the unfiltered array, i.e. the same output as wlmapi_get_members. Parameters This function accepts no parameters. Return Returns a string containing the filtered list. Example Code <?php //On the page displaying the levels $members = wlmapi_the_members(); echo […]

Function Reference: wlmapi_get_members

Retrieves all members. Parameters This function accepts no parameters. Return Returns a multi-dimensional array containing data for each member. Example Code <?php $members = wlmapi_get_members(); print_r($members); ?> Example Output Array ( [success] => 1 [members] => Array ( [member] => Array ( [0] => Array ( [id] => 1 [user_login] => john [user_email] => johnistheman@wlptest.com […]

Function Reference: wlmapi_remove_member_from_level

Removes a member from a membership level Parameters level_id (int) – The ID of the level to remove the member from member_id (int) – The ID of the member to remove Return Returns a multi-dimensional array containing the operation status. Example Code <?php $member = wlmapi_remove_member_from_level(1344363854, 11); print_r($member); ?> Example Output Array ( [success] => 1 […]

Function Reference: wlmapi_update_level_member_data

Updates a member’s membership level data according to the specified arguments. Parameters level_id (int) – The ID of the level to update data for member_id (int) – The ID of the member to update args (array) – An array of accepted arguments specified below: Parameter Description Required Default Cancelled (boolean) Cancellation status for the new member Optional false […]