• Resolved neueweide

    (@neueweide)


    Hi this is a sequel of the topic “How to approve automatically after registration?”
    you closed this a bit to early i’m sorry ??
    https://www.ads-software.com/support/topic/how-to-approve-automatically-after-registration/?#post-14616014

    now i’m fetching same issue but not with the approve(); line but with the set_role(); line ?!

    um_fetch_user( $user_id );
    UM()->user()->approve();
    UM()->user()->set_role( $right_level_auto_activation_role );

    I got this error messge:

    PHP Fatal error: Uncaught Error: Call to undefined method um\core\User::set_role() in /home/wp/disk/wordpress/wp-content/themes/...

    Have you any ideas what’s the reason, seems like the method set_role() is unknown? The UM()->user()->approve(); works fine.

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘set_role(); not defined?’ is closed to new replies.