Skip to content

Instantly share code, notes, and snippets.

@turingmachine
Created October 24, 2011 11:59
Show Gist options
  • Select an option

  • Save turingmachine/1308855 to your computer and use it in GitHub Desktop.

Select an option

Save turingmachine/1308855 to your computer and use it in GitHub Desktop.
<?php
function list_supporters() {
global $wpdb;
$wp_supporter_search = $wpdb->get_results("
SELECT user_id
FROM $wpdb->usermeta
WHERE meta_value = '1' AND user_id != '60'
ORDER BY user_id
");
foreach($wp_supporter_search as $supporter) {
$supporter = get_userdata($supporter->user_id);
echo $supporter->first_name . ' ' .
$supporter->last_name . ', ' .
$supporter->ort .'<br />';
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment