• Resolved Miggi

    (@andreasmickler)


    We’ve a multisite installation of WordPress and I use Import users from CSV with meta to add and remove users on one of our sites.

    The import works well but the plugin doesn’t remove users, that are no longer in the csv file.

    I’ve changed a part in importer.php to:

    // delete all users that have not been imported
    if( $is_cron && get_option( “acui_cron_delete_users” ) ):
    require_once( ABSPATH . ‘wp-admin/includes/user.php’);

    $all_users = get_users( array(
    ‘fields’ => array( ‘ID’ ),
    ‘role__not_in’ => array( ‘administrator’ )
    ) );
    $cron_delete_users_assign_posts = get_option( “acui_cron_delete_users_assign_posts”);

    foreach ( $all_users as $user ) {
    if( !in_array( $user->ID, $users_registered ) ){
    if( ($user->ID != 1) && ($user->ID != 2) && ($user->ID != 3) && ($user->ID != 5) && ($user->ID != 6) && ($user->ID != 9) && ($user->ID != 10) && ($user->ID != 11) ){
    wpmu_delete_user( $user->ID );
    }
    }
    }
    endif;

    Is there any problem I didn’t see?

    Best regards
    Miggi

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Javier Carazo

    (@carazo)

    Miggi,

    Sorry but we don’t attend personal like this.

    Only general problems, not changed codes.

    If you want some kind of proffessional support like this you are asking for, please tell us directly here.

    Thread Starter Miggi

    (@andreasmickler)

    Ok, thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Plugin doesn’t delete users that are not in the list’ is closed to new replies.