latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

List Members, Custom Field Values, and Level

Home Forums Community Forum List Members, Custom Field Values, and Level

This topic contains 3 replies, has 2 voices. Last updated by  Bruce 4 years, 4 months ago.

Topic Author Topic
Posted: Sunday Sep 2nd, 2012 at 9:07 pm #23882
Rob
Username: digitsoft

I need php code that will list all members, custom field values, and level – like in the admin area, but code that I can use in a page/post. I’ll need to iterate through the results…

I don’t need any formatting – just code that will do this. I tried digging through the code and also Google looking for a function that would do this, but came up empty. I found ways to list wp users, but I need access to the S2 meta data as well.

Thanks ahead of time…

List Of Topic Replies

Viewing 3 replies - 1 through 3 (of 3 total)
Author Replies
Author Replies
Posted: Sunday Sep 2nd, 2012 at 9:33 pm #23886
Bruce
Username: Bruce
Staff Member

You should be able to do this with get_users().

$users = get_users();
foreach ($users as $user) {
     echo '<li>' . $user->display_name . '</li>';
} 

You could also use $user->ID within the foreach() to get_user_meta().

Posted: Monday Sep 3rd, 2012 at 10:18 am #23945
Rob
Username: digitsoft

Alright..that worked…got the users and meta data…and still took more to get what I needed.

Took an hour or so to figure out the rest….learned about json & unserialize ;)

Thanks…

Posted: Monday Sep 3rd, 2012 at 1:28 pm #23954
Bruce
Username: Bruce
Staff Member

Hi Rob,

Glad to hear you got that worked out. Sorry you had trouble with it.

Viewing 3 replies - 1 through 3 (of 3 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.