Hi Gaurav,
This is exactly what you need. Displays a list of all the authors that have authored at least one post:
<?php
// Displays user name and email from users with at least one post
$blogusers = get_users_of_blog();
if ($blogusers) {
foreach ($blogusers as $bloguser) {
$args = array(
'author' => $bloguser->user_id,
'showposts' => 1,
'caller_get_posts' => 1
);
$my_query = new WP_Query($args);
if( $my_query->have_posts() ) {
$user = get_userdata($bloguser->user_id);
echo "<li>".$user->user_firstname."</li><li>".$user->user_email."</li>";
}
}
}
?>
The second IF ensures that the user has at least one post. If you want to display all the users (having posted something or not) remove these lines:
$my_query = new WP_Query($args);
if( $my_query->have_posts() ) {
}
Hope this helps :)
Adapted code from here: http://wordpress.org/support/topic/274474?replies=2