User Role Meta Key incorrect
-
Hi,
I have two sites running the UM plugin, one dev and one live.
I have tried to replicate the same set-up on both, however, due to complications, I had to uninstall the UM plugin from the live site. I then noticed it still retained all the settings from the previous set-up, so I managed to find the “Remove Data on Uninstall”.
Everything seemed fine until I needed to build the registration form. Within this form I have a drop down where users can select the role they wish (UM User Roles).
When I created this, I got the message that the Meta Key I wanted to use was “Your meta key is a predefined reserved key and cannot be used”.
Now the Meta Key I wanted to use is named “role_select”, which I do not believe is a reserved name by UM, so I had to name give the drop down a different Meta Key “select_role”.
The issue is that no matter what users I add to my drop down and create in the UM User Roles, it does seemingly correlate. That is, upon registering, the user (as defined by the role) should be redirected to a different page. It’s as if they are being registered, but without any of the UM details.When I look at the registered user in the admin (Users – Select Uder – Edit), I can see the Ultimate Member details and the dropbox asking if I want to select an ‘Ultimate Member Role’ for this user. So it has not assigned anything, despite selecting a UM defined User Role in the drop down.
The only thing that is different in the two setups is the Meta Key for the drop down. I can only presume that somehow the installation is still trying to correlate the old roles Meta Key with the User Roles and Users.
Just trying to work out how I can get my new Meta Key to work with the UM User Roles and Users, or if I can flush the old one that it thinks still exists.
My worry is then how does the UM plugin and the users element understand what Meta Key to look for……..
The last thing I want to do is re-install everything, especially as I am not 100% that this will cure the issue.
The only other thought I had was as if I could somehow reset what UM is looking for as the User Role Meta.
My thinking is that due to some legacy, the setup is looking to associate any UM user roles with the old meta key from the drop down in the registration form ‘role_select’, but because I annot have this as a meta key, it cannot associate the new one ‘select_role’ with any current or new UM user roles I set up.
Not sure how this all works but say I have a clean instal. WP already has defined ‘Users’ setup. SO when I add a new UM User Role, I create a drop down in my form, enter a Meta Key give it some choices which are the same name as my UM User roles.At what point does the plugin go, ahh, any names of roles entered in the drop down need to have a matching User Role and Meta Key ?
I still think the issue is that the plugin is expecting a drop down with a Meta Key ‘role_select’ to be there as any um_roleID – User Roles I setup expect to have the correlating Meta Key……
Totally confused……..Any help is appreciated.
####### EDIT #######
Ok, so by going into the UM ‘Settings’ page and under ‘Users’, I just happened to decide to change the ‘Registration Default Role’ from ‘Default’ to one of my created UM User Roles and it works !
Not sure what is going on here. Still convinced the plugin has got confused with an old Meta Key, so I would still really like to understand this.
- You must be logged in to reply to this topic.