• Resolved nickstaw

    (@nickstaw)


    Hi
    Is there a way to restrict approval/denial to just Admin user. I need other roles to have the ability to view all users profiles so have enabled this in role editor but just not have the ability to approve/deny. Is there an action/filter to do this?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @nickstaw,

    Thanks for using the New User Approve,

    We are checking this and we will update you in short.

    Thanks

    Hi @nickstaw,

    Thanks for your patience,

    Kindly add this code in your child themes’ functions.php file.

    add_filter('new_user_approve_validate_status_update','funct_new_user_approve_validate_status_update',10,3);
      function funct_new_user_approve_validate_status_update( $do_update, $user_id, $status )
      {
      $current_status = pw_new_user_approve()->get_user_status( $user_id );
        if(!current_user_can( 'manage_options' )){
        	wp_die('Sorry you dont have acces');
        	
      }
    }

    Thanks

    Hi @nickstaw,

    Due to a lack of activity, we are going to mark this thread as resolved. If you have any other issues, please feel free to open a new thread.

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Restricting approval/denial to admin user’ is closed to new replies.