• Resolved brening

    (@brening)


    Hello.
    After updating the plugin, the hook um_after_user_updated( $user_id, $args, $userinfo ) stopped receiving the user role. The user role was passed in the parameter $args[‘role’].

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @brening

    Have you tried catching the submitted data with $_REQUEST?

    Regards,

    Thread Starter brening

    (@brening)

    No, I get the parameters as hook parameters.

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @brening

    Did you assign a role to your Register form? Or a role field has been added to your registration form?

    Regards,

    Thread Starter brening

    (@brening)

    I did assign a role to Register form.

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @brening

    Sorry for the late response. Just checking if you’ve found the solution to your issue? Does the role have the ability to manage options or read users and post?

    You can also try retrieving the role with the following code snippets:

    add_action("um_after_user_updated,"um_061821_catch_role",10,2);
    function um_061821_catch_role( $user_id, $args, $userinfo ){
        um_fetch_user( $user_id );
        $role = um_user("role");
    } 
    

    Regards,

    • This reply was modified 3 years, 5 months ago by Champ Camba.
    Thread Starter brening

    (@brening)

    Hello. Yes, I did something similar, but it was more convenient when this parameter was passed. Too many extra requests are received.

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @brening

    There was a security vulnerability issue when passing the role via um_after_user_updated so the above code snippet should be used to retrieve the user role.

    Regards,

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Hook um_after_user_updated’ is closed to new replies.