• How do I set the UM role settings via PHP? Specifically, I am automating the creation of a new role with the add_role method, now I need to enable the ‘Can edit their profile?’ setting with code.

    Another option would be to duplicate an existing role that is configured the way I want, but I can’t figure out how to do that and maintain the role settings.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support andrewshu

    (@andrewshu)

    Hello @jdowns1

    In the wp_options table in the database there are option_name = “um_role_editor_meta” (for example). The option_value contain the role settings. Unfortunately that’s all I can help you with.

    Regards.

    Plugin Support andrewshu

    (@andrewshu)

    Hi @jdowns1

    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

    Thread Starter jdowns1

    (@jdowns1)

    I’m sorry @andrewshu, I’ve spent several days trying to figure this out with no luck.

    Let’s try this instead – can you provide a snippet of how to clone an existing UM role with the same settings?

    @jdowns1

    Have you tried this Gist at GitHub?

    https://gist.github.com/felixzapata/9144986

    Thread Starter jdowns1

    (@jdowns1)

    @missveronicatv

    Yes I have done that, and while it clones the role and WP capabilities, it does not fully clone – the UM specific role properties are not cloned which is what I need. Settings like ‘can edit their profile’ and registration options like ‘require admin review’ and the custom admin review message.

    @jdowns1

    You will find all these UM settings in the WP options table
    with the option_name um_role_xxx_meta where xxx is the role

    UM roles are found with the option_name um_roles

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How to change role settings via PHP’ is closed to new replies.