Nom |
Pseudo |
Téléphone |
Photo au naturel |
Photo en parapentiste |
Photo en vol |
get_col( $wpdb->prepare(
« SELECT $wpdb->users.ID FROM $wpdb->users ORDER BY %s ASC »
, $szSort ));
/*
Once we have the IDs we loop through them with a Foreach statement.
*/
foreach ( $aUsersID as $iUserID ) :
/*
We use get_userdata() function with each ID.
*/
$user = get_userdata( $iUserID );
/*
Here we finally print the details wanted.
Check the description of the database tables linked above to see
all the fields you can retrieve.
To echo a property simply call it with $user->name_of_the_column.
In this example I print the first and last name.
*/
echo ‘
‘;
echo ‘
‘ . ucwords( strtolower( $user->first_name . ‘ ‘ . $user->last_name ) ) . ‘ |
‘;
echo ‘
|
‘;
}
else {echo ‘
|
‘;}
$value = get_cimyFieldValue($user->ID, ‘PHOTO_EQUIP’);
if(strcmp($value, »)) {
echo ‘
|
‘;
}
else {echo ‘
|
‘;}
$value = get_cimyFieldValue($user->ID, ‘PHOTO_PARA’);
if(strcmp($value, »)) {
echo ‘
|
‘;
}
else {echo ‘
|
‘;}
echo ‘
‘;
/*
The strtolower and ucwords part is to be sure
the full names will all be capitalized.
*/
endforeach; // end the users loop.
?>