[Resolved] role on update in cred_save_data not update wp_capabilities
This support ticket is created 5 years, 8 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
Tell us what you are trying to do?
Hi, Have a userform thats working fine but in that form i have a select to a custom field select from where i can select roles. Works fine but hereafter i want to save the select to wp_capabilities, but toolset overwrite and insert in front of str: s:32:" and end of string a ";
in cred_save_data i have tried,
After this insert wp_usermeta->meta_key->wp_capabilities->meta_value->s:32:"a:1:{s:14:"administration";b:1;}";
how to prevent toolset from setting this in front s:32:" and this in end ";
THINK THE PROBLEM SOMEHOW IS THE SETTINGS IN USER FORM "ROLE OF THE USER TO CREATE..
this another update works find:
So a solution maybe in cred_before_save_data to overwrite Role?
Is there any documentation that you are following? https://toolset.com/forums/topic/update-user-custom-field/
Is there a similar example that we can see?
user protected
What is the link to your site?