Roster

[wp-members status=”in”]
[insert_php]
global $wpdb, $roster;
$maxid = $wpdb->get_var(“SELECT max(ID) FROM wp_users”);

for ($id = 1; $id <= $maxid; $id++) { $all_meta_for_user = get_user_meta( $id ); $ln =$all_meta_for_user['last_name'][0]; $roster[$ln] = " {$all_meta_for_user[‘first_name’][0]} “;
$roster[$ln] .= “{$all_meta_for_user[‘last_name’][0]}

“;
$roster[$ln] .= “

{$all_meta_for_user[‘addr1’][0]} {$all_meta_for_user[‘city’][0]}

“;
$roster[$ln] .= “

{$all_meta_for_user[‘thestate’][0]} {$all_meta_for_user[‘zip’][0]}

“;
$roster[$ln] .= “

{$all_meta_for_user[‘phone1’][0]}

“;
}

[/insert_php]

[insert_php]
ksort($roster);
foreach ($roster as $key => $val) {
echo $val;
}
[/insert_php]

Name Address City State Zip Phone

To send an email to the person click on their name or right click to copy their email address.
[/wp-members]