I've created a new role named adivaha_partner and when registering it with the new role I am using update_user_meta and add_user_meta for inserting and updating in meta table.

All things are working fine except the fact that when wp_capabilities is getting stored in the table, It's getting saved like s:33:"a:1:{s:15:"adivaha_partner";b:1;}"; this and with which roles aren't getting properly viewed and is showing "None" instead of showing the role. Please help me solve it.

Thanks in advance :-)

  • 1
    Hello! Can you include the code that you're using to update the role? Roles aren't stored in user meta, and that value looks like a serialised PHP string, equivalent to [ "adivaha_partner" ] – Tom J Nowell Sep 10 at 10:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.