set_role(); not defined?
-
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-14616014now 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? TheUM()->user()->approve();
works fine.
- The topic ‘set_role(); not defined?’ is closed to new replies.