Tips and Tricks HQ Support Portal › Forums › WP eMember › WP eMember Troubleshooting › WP-eMember Page Bug: Members > Edit formats the user_nicename wrongly!
Tagged: bbpress, edit, import, user, user_nicename
- This topic has 4 replies, 3 voices, and was last updated 13 years ago by admin.
-
AuthorPosts
-
November 16, 2011 at 7:39 am #4790woodwardmattMember
Hey Guys,
I have spotted a bug with the eMember plug-in. When a user is either:
– Edited through the admin screen (/wp-admin/admin.php?page=wp_eMember_manage&members_action=add_edit&editrecord=<id>)
or
– Created in WP using the “Admin Functions > Create WP Account”
The WordPress users user_nicename property is incorrectly formatted. This is an issue as other plugins rely on this property as a sanitised version of the username. In this instance this issue breaks the ability for the bbPress plugin (2.0) to correctly link through to user profiles.
**Steps to reproduce the error**
1) Create a wordpress user (important the username must have a space in it e.g. “A Name”)
2) Observe the user_nicename property in the wp_users table in the database (all lower case and all spaces changed to hyphens) e.g. “a-name”
3) Login to wp-admin area
4) Navigate to WP-eMembers > Members then choose to import the new WordPress user.
5) Locate the new member in the member list and choose to edit the user
6) Make a change to the users profile e.g. update the phone number
7) Choose to Save Member Info
**What you saw**
Within the wp_users table in the database the users user_nicename property has been changed to “A Name”.
**What you expected to see**
Within the wp_users table in the database the users user_nicename property has been left untouched. There should be no need to change this field once the user is created.
**Note**
The same issue is observed if creating WP Accounts for eMembers which have been imported. In this instance the Admin Functions > Create WP Accounts routine needs to actively format the user_nicename property correctly i.e. all lowercase, all spaces changed to hyphens.
**Extra Details**
Wordpress Version: 3.2.1
eMember Plugin Version: 7.3.2
PHP version: 5.2.17
Apache version: 2.2.21
MySQL version: 5.1.59
November 16, 2011 at 8:08 am #38572woodwardmattMemberFor anyone stuck with this issue at the moment, the following SQL statement will reformat your existing users within the WP database:
UPDATE wp_users SET user_nicename = REPLACE(LCASE(user_nicename),' ','-');
November 17, 2011 at 1:04 am #38573nurMemberfix is ready. an update will be released soon.
November 17, 2011 at 5:23 am #38574woodwardmattMemberExcellent, thanks for the update nur! Any initial thoughts on timescales?
Cheers, Matt
PS: Loving your support team, excellent work!
November 17, 2011 at 10:40 pm #38575adminKeymasterA new build is ready for you. Please get it from here:
-
AuthorPosts
- You must be logged in to reply to this topic.