Exclude admin from author list based on user_login instead of user_nickname since user_nickname can be changed. http://mosquito.wordpress.org/view.php?id=1090 Props: MC_incubus

git-svn-id: http://svn.automattic.com/wordpress/trunk@2444 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2005-03-14 01:09:49 +00:00
parent c4b6f0fa51
commit 59ae577d6b

View File

@ -156,7 +156,7 @@ function wp_list_authors($args = '') {
function list_authors($optioncount = false, $exclude_admin = true, $show_fullname = false, $hide_empty = true, $feed = '', $feed_image = '') {
global $wpdb;
$query = "SELECT ID, user_nickname, user_firstname, user_lastname, user_nicename from $wpdb->users " . ($exclude_admin ? "WHERE user_nickname <> 'admin' " : '') . "ORDER BY user_nickname";
$query = "SELECT ID, user_nickname, user_firstname, user_lastname, user_nicename from $wpdb->users " . ($exclude_admin ? "WHERE user_login <> 'admin' " : '') . "ORDER BY user_nickname";
$authors = $wpdb->get_results($query);
foreach($authors as $author) {