verygoodplugins

Untitled

Feb 12th, 2021
554
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function my_stuff() {
  2.  
  3.     if ( isset( $_GET['deactivate'] ) ) {
  4.  
  5.         $user_id = wpf_get_user_id( $_GET['contact_id'] );
  6.  
  7.         // Set user to default usergroup
  8.  
  9.         WPF()->member->set_usergroup( $user_id, get_option( 'wpforo_default_groupid' ) );
  10.  
  11.         // Remove from LD group #123
  12.  
  13.         ld_update_group_access( $user_id, $group_id = 123, $remove = true );
  14.  
  15.         // Remove from course #456
  16.  
  17.         ld_update_course_access( $user_id, $course_id = 456, $remove = true );
  18.  
  19.     }
  20.  
  21. }
  22.  
  23. add_action( 'init', 'my_stuff' );
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×