#9165 closed defect (bug) (wontfix)
wp_list_authors: exclude_admin doesn't work if user_login <> 'admin'
Reported by: | flocsy | Owned by: | |
---|---|---|---|
Milestone: | Priority: | low | |
Severity: | minor | Version: | 2.7 |
Component: | General | Keywords: | |
Focuses: | Cc: |
Description
If admin's username (user_login) is changed (for security reasons), wp_list_authors doesn't exclude it.
Attachments (1)
Change History (9)
#3
follow-up:
↓ 4
@
16 years ago
It would really depend on what the exclude_admin is meant to do. If it literally excludes "admin" then it's working as designed. Otherwise if it is meant to exclude ALL admins then it should really be checking against admin like role membership, because there could be more than one admin not necessarily just ID = 1.
#4
in reply to:
↑ 3
@
16 years ago
According to the Codex:
Exclude the 'admin' (login is admin) account from authors list.
So this function does work as intended. The question is whether that is the correct functionality. I think it would be better if the user can set which accounts to exclude like so:
wp_list_authors('exclude=admin,bob');
#5
@
16 years ago
- Cc westi added
- Keywords has-patch 2nd-opinion removed
This is a nice piece of history.
I guess the correct thing to do is to try and extra the use case that is required.
Do people really want to exclude particular active authors from the list.
Is the hide_empty parameter enough.
Removing has-patch because the current patch doesn't provide much of an improvement.
I would rather we deprecated this feature over something more useful.
#6
follow-up:
↓ 7
@
15 years ago
- Keywords wp_list_authors exclude_admin removed
I'd say we remove the option or close as wontfix.
there are a few tickets related to retrieving users with a given role or cap, and there is not a chance they'll get fixed any time soon.
#7
in reply to:
↑ 6
@
15 years ago
- Resolution set to wontfix
- Status changed from new to closed
Replying to Denis-de-Bernardy:
I'd say we remove the option or close as wontfix.
there are a few tickets related to retrieving users with a given role or cap, and there is not a chance they'll get fixed any time soon.
Ditto. Closing.
I'd be happy to create a patch. The question is what would be the best whay to decide who's the admin?
Currently this is the SQL:
Would it be OK to change this to:
?