thebrandonallen / edit-author-slug

WordPress plugin that allows an admin (or capable user) to edit the author slug of a user, and change the author base. New development takes place on the 'develop' branch.
http://wordpress.org/plugins/edit-author-slug/
GNU General Public License v2.0
41 stars 8 forks source link

Add support for iThemes Security #11

Closed thebrandonallen closed 6 years ago

thebrandonallen commented 7 years ago

iThemes Security has a setting named Force Unique Nickname. This is essentially a pseudonym for forcing the user_nicename field to be different than the user_login field.

Both Edit Author Slug and iThemes Security hook into user_profile_update_errors with a priority of 10, but because iThemes Security adds it's hook after Edit Author Slug, it's functionality always wins, and means that the user_nicename will always be nickname or firstname-lastname.

It would be nice to integrate with iThemes Security, given that the WordPress plugin directory reports installation numbers of 800,000+. Below is a list of how I see this being implemented.

  1. Check for the existence of iThemes Security and Force Unique Nickname being set to true.
  2. Remove the iThemes Security force_unique_nicename action.
  3. On update, never allow the user_nicename to be equal to user_login.
  4. Don't show user_login as an available option on profile pages or in settings.