1. Home
  2. Knowledge Base
  3. API
  4. Function Reference
  5. Function Reference: wlmapi_get_level_members

Function Reference: wlmapi_get_level_members

Retrieves all members of the specified level.

Parameters

  • level_id (int) – The ID of the level to retrieve members from

Return

Returns a multi-dimensional array containing data for each member.

Example Code

<?php
     $members = wlmapi_get_level_members(1340726008);
     print_r($members);
?>

Example Output

Array
(
    [success] => 1
    [members] => Array
        (
            [member] => Array
                (
                    [0] => Array
                        (
                            [id] => 11
                            [user_login] => wray
                            [user_email] => [email protected]
                            [_more_] => /levels/1340726008/members/11
                        )

                    [1] => Array
                        (
                            [id] => 12
                            [user_login] => stu
                            [user_email] => [email protected]
                            [_more_] => /levels/1340726008/members/12
                        )

                )

        )

    [supported_verbs] => Array
        (
            [0] => GET
            [1] => POST
        )

)

Notes

This functions returns WLMAPIMethods::get_level_members() in core/api-helper/class-api-methods.php

Was this article helpful?

Related Articles

Need Support?

Can't find the answer you're looking for?
Contact Support