• So 3 years ago, I started using this plugin for a client site, created custom roles with it, and a registration form with the role selector. I’m not sure when the issue began as our users tend to only use it annually from December through April so it could’ve been anytime since May 2023.

    Anyway, when I view the user roles in the backend, it says “No” in the “UM Custom Role” column despite having made it with Ultimate Member years ago and the role still has the “um_” prefix in the role ID. I created a test role just now and, as expected, it does say “Yes” and has the “um_” prefix.

    This has become an issue because as new users are trying to register, the role selection field is an empty list since your documentation shows that only roles created by UM will be recognized, and as we’ve determined, it no longer recognizes these older roles made by it.

    Is there a reason why the plugin no longer recognizes these roles as being made by it? Is there a way to fix it so that it will recognize them? There are over 100 users on the site and I’d rather not recreate and reassign the roles.

    I suppose I’ll use the Choices Callback feature as a workaround for now, but it’s disappointing that it just stopped working. Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Tessa (they/them), AuRise Creative

    (@tessawatkinsllc)

    Okay, the Choices Callback feature was not what I was expecting it to be. I had assumed I could write a function in PHP to populate the choices on the frontend, but instead it seems the function just populates the choices in the backend which is still subject to your plugin’s limitations of only choosing roles created by your plugin… which is still a problem for me because it’s not recognizing it’s older roles as having been created by it…

    Thoughts?

    Plugin Support yuriinalivaiko

    (@yuriinalivaiko)

    Hello @tessawatkinsllc

    Something went wrong with your website options.

    All user roles created by Ultimate Member should be added to the array in the um_roles option.

    Do you have database access? Verify the um_roles option in the *options table. See example. Just look at the database, don’t change the option value manually.

    If you want to change the option value to add a role to the “UM Custom Role” list you have to write and execute once a simple PHP code snippet that uses the get_option function to get the current option value, adds a role slug (Role ID without a prefix) to the array then uses the update_option function to save a modified option value.

    Code example for the um_users-manager role:

    $um_roles   = get_option( 'um_roles', array() );
    $um_roles[] = 'users-manager';
    update_option( 'um_roles', array_unique( $um_roles ) );

    Regards

    Plugin Support andrewshu

    (@andrewshu)

    Hi @tessawatkinsllc

    This thread has been inactive for a while so we’re going to go ahead and mark it Resolved.

    Please feel free to re-open this thread if any other questions come up and we’d be happy to help. ??

    Regards

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘UM Custom Roles are Not Recognized’ is closed to new replies.