Opened 20 years ago
Closed 20 years ago
#1090 closed defect (bug) (fixed)
list_author() parameter not being followed if admin account not called admin
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | minor | Version: | 1.5 |
Component: | Template | Keywords: | |
Focuses: | Cc: |
Description
The Codex lists the usage of the list_athor() tag as this:
< ?php list_authors(optioncount, exclude_admin,
show_fullname, hide_empty,
'feed', 'feed_image'); ? >
The "exclude admin" option will not exclude admin if you change the Nickname of the admin to anything else but admin. This should not be as it should only exclude the userlevel of 10 (that being the admin account).
Attachments (1)
Change History (12)
#3
@
20 years ago
"This should not be as it should only exclude the userlevel of 10 (that being the admin account)."
That would work only if the user level on one or more accounts has not been changed to 10 as well (through the db). I believe the possible best option is to exclude based on user login ('admin').
#4
@
20 years ago
Should there only be one level 10 admin? A level 9 user is capable of doing everything except assigne ownership of pages or posts to a level 10, and you can't upgrade a level 9 to 10 user via normal means.
#5
@
20 years ago
That's up to the devs to decide, as they'd need to find a way of limiting it. But I believe the goal with the 'exclude_admin' argument was to hide just the original admin account, and not all possible admins. That can be done by the login name or ID.
#6
@
20 years ago
- Resolution changed from 10 to 70
Neither the login ('admin') nor the ID (1) nor the level (10) can be changed without hacking the database.
There's really no reason to change any of these things. Level 8 and 9 accounts have just as much access as the level 10 admin account. See here: http://codex.wordpress.org/User_Levels
#7
@
20 years ago
MC_incubus, I agree completely.
So does it not make sense to have the tag base it on Userlevel, and not an arbitrary name that can be changed causing the tag to not behave as intended?
#8
@
20 years ago
There's one thing you can't do at 9: edit posts created by the admin account.
'exclude_admin' runs into problems when tied to nickname, so it should be aimed at something unique and permanent; it's more likely the admin ID/login will go untouched than the user levels for other accounts.
Use the tag as such:
< ?php list_authors(,TRUE,); ? >
And the admin will be excluded on the list. Now change the "Admin" Nickname to anything other than admin, and it appears in the author list.