Advertisement
verygoodplugins

Untitled

Feb 22nd, 2018
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.55 KB | None | 0 0
  1. add_action('wpf_tags_modified', 'my_wpf_delete_user', 10, 2);
  2.  
  3. function my_wpf_delete_user( $user_id, $user_tags ) {
  4.    
  5.     if( ! wp_fusion()->user->has_tag('GFTB Full Membership - Activated', $user_id) && ! user_can($user_id, 'manage_options') ) {
  6.         wp_delete_user( $user_id );
  7.     }
  8.    
  9. }
  10.  
  11.  
  12. add_action('wpf_got_contact_id', 'my_wpf_delete_user_by_cid', 10, 2);
  13.  
  14. function my_wpf_delete_user_by_cid( $user_id, $contact_id ) {
  15.  
  16.     if( $contact_id == false && ! user_can($user_id, 'manage_options') ) {
  17.         wp_delete_user( $user_id );
  18.     }
  19.  
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement