Change WordPress user roles and capabilities Forums How to or FAQ How can I rename the whole role?

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #8522
    WUCW
    Participant

    I have a role called NAME1(name1), and I want to rename the whole role, not just NAME2(name1), but also the id.

    Resulting in getting the name to show NAME2(name2).

    How is that possible?

    THX
    WUCW

    #8524
    Vladimir
    Keymaster

    Hi WUCW,

    You can not do it directly. Workaround, create a new role name2 as a copy of nor name1. Then revoke role name1 from all users, whom it’s granted and grant them new role name2.

    #8526
    WUCW
    Participant

    Okay, thanks.

    But what happens to data that is “connected” to the old role-ID?
    My reason for renaming the old role-ID was to keep the data connected.

    #8527
    Vladimir
    Keymaster

    Understand.

    There is no UI in plugin to automatically move add-ons data linked to the older role to a new one.

    #8528
    WUCW
    Participant

    The ID must be in the database somewhere.
    Where can I look for it, and try to change it?

    #8529
    Vladimir
    Keymaster

    Look at wp_options db table (wp_ is db prefix):

    SELECT * FROM wp_options WHERE option_name like 'ure%';

    All data are serialized arrays.

    #8531
    WUCW
    Participant

    Thanks for helping, but the role didn’t show up.
    I changed the prefix to the right one, but none of the 16 roles turned up.
    All 16 roles have been made with your plugin.

    Are we looking in the right table?

    THX

    #8534
    Vladimir
    Keymaster

    You should see the similar result:

    option_name field contains URE internals ID used by add-ons to save its data.

    Roles ID would be found inside the option_value field for every record. It’s a string where a serialized PHP array data are stored.

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.