• Resolved superkot

    (@superkot)


    Hi,
    I have used the plugin once to edit user role (it was Merchant that I edited) to find that “customer” got duplicated. If I hover on each of “customers”, I can see in the status bar that one is “Customer” (capitalized) and the other is “customer”. They obviously include the same users.

    https://ibb.co/bTxivQ

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Vladimir Garagulya

    (@shinephp)

    Hi,

    What do you see at the “Select Role” drop-down list at “Users->User Role Editor” page?
    URE shows “Role name (role id)” there. I suppose that you can have something like ‘Customer (customer)’ and ‘Customer (Customer)’. Look if the 2nd one is available for deletion at the ‘Delete Role’ list.

    Let me know if you can repeat this role duplication via URE user interface.

    MySQL string comparing is case insensitive. You can see both roles assigned to the same users at different role views for this reason.

    Thread Starter superkot

    (@superkot)

    They are shown as “Customer (Customer)” and “Customer (customer)” indeed. When I click on Delete Role, none of the two is in the list (I assume, because there are users).

    Plugin Author Vladimir Garagulya

    (@shinephp)

    I suppose that 2nd role was added by code. I tried to add something similar manually with “User Role Editor->Add Role” but get an error message without adding a new role.
    The only way to fix a problem I see is to edit roles data at wp_options db table: manually via suitable MySQL client tool, like myPhpAdmin or similar or via special PHP script.

    Read this article to get more information about WordPress roles record data structure.

    You have to remove duplicated role data from the serialized PHP array value or write a small script to make it via PHP.

    Thread Starter superkot

    (@superkot)

    I fixed this by creating another role, moving all users inside it, deleting extra “customer”, then moving users back to the remaining “customer”.

    The problem however is that the double somehow got created in the first place after usage or installation of URE. We did not use any code or other editors related to user roles on the website, all existing roles were originating from the template or well-known plugins (Woocommerce, Loco Translate).

    Plugin Author Vladimir Garagulya

    (@shinephp)

    Excellent, that you found a easy workaround. I did not think about this way.

    Just in case if you will isolate this (repeat with known scenario, etc.), let me know, in order to I can fix an issue, if it’s related to URE.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘User role duplicated’ is closed to new replies.