mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
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: https://develop.svn.wordpress.org/trunk@2444 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user