Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function my_stuff() {
- if ( isset( $_GET['deactivate'] ) ) {
- $user_id = wpf_get_user_id( $_GET['contact_id'] );
- // Set user to default usergroup
- WPF()->member->set_usergroup( $user_id, get_option( 'wpforo_default_groupid' ) );
- // Remove from LD group #123
- ld_update_group_access( $user_id, $group_id = 123, $remove = true );
- // Remove from course #456
- ld_update_course_access( $user_id, $course_id = 456, $remove = true );
- }
- }
- add_action( 'init', 'my_stuff' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement