Skip to main content
Rollback to Revision 4
Source Link

For Drupal 8, with drush under Linux (with bash) you can use the following Bash script that requires Drush.solution:

echo 'select name from users_field_data where status=0 and uid!=0' | mysql --silent drupaldatabase > userlist
for username in `cat userlist`; do drush user-cancel $username -y; done
    echo 'select name from users_field_data where status=0 and uid!=0' | mysql --silent drupaldatabase > userlist
    for username in `cat userlist`; do drush user-cancel $username -y; done

This is both rather slow (1 user/s), but and safe. It doesn't work with names containing spaces or special UTF-8 characterscharacter names and names with spaces.

For Drupal 8, you can use the following Bash script that requires Drush.

echo 'select name from users_field_data where status=0 and uid!=0' | mysql --silent drupaldatabase > userlist
for username in `cat userlist`; do drush user-cancel $username -y; done

This is rather slow (1 user/s), but safe. It doesn't work with names containing spaces or special UTF-8 characters.

For Drupal 8 with drush under Linux (with bash) you can use following solution:

    echo 'select name from users_field_data where status=0 and uid!=0' | mysql --silent drupaldatabase > userlist
    for username in `cat userlist`; do drush user-cancel $username -y; done

This is both rather slow (1 user/s) and safe. It doesn't work with special UTF-8 character names and names with spaces.

improved formatting
Source Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284

For Drupal 8 with drush under Linux (with bash), you can use the following solution:Bash script that requires Drush.

    echo 'select name from users_field_data where status=0 and uid!=0' | mysql --silent drupaldatabase > userlist
    for username in `cat userlist`; do drush user-cancel $username -y; done
echo 'select name from users_field_data where status=0 and uid!=0' | mysql --silent drupaldatabase > userlist
for username in `cat userlist`; do drush user-cancel $username -y; done

This is both rather slow (1 user/s) and, but safe. It doesn't work with names containing spaces or special UTF-8 character names and names with spacescharacters.

For Drupal 8 with drush under Linux (with bash) you can use following solution:

    echo 'select name from users_field_data where status=0 and uid!=0' | mysql --silent drupaldatabase > userlist
    for username in `cat userlist`; do drush user-cancel $username -y; done

This is both rather slow (1 user/s) and safe. It doesn't work with special UTF-8 character names and names with spaces.

For Drupal 8, you can use the following Bash script that requires Drush.

echo 'select name from users_field_data where status=0 and uid!=0' | mysql --silent drupaldatabase > userlist
for username in `cat userlist`; do drush user-cancel $username -y; done

This is rather slow (1 user/s), but safe. It doesn't work with names containing spaces or special UTF-8 characters.

Rollback to Revision 2 - Edit approval overridden by post owner or moderator
Source Link

For Drupal 8 with drushdrush under Linux (with bash) you can use following solution:

    echo 'select name from users_field_data where status=0 and uid!=0' | mysql --silent drupaldatabase > userlist
    for username in `cat userlist`; do drush user-cancel $username -y; done

This method is both relativelyrather slow (1 user/s) and safe. It doesn't work with special UTF-8 character names and names with spaces.

For Drupal 8 with drush under Linux (with bash) you can use following solution:

echo 'select name from users_field_data where status=0 and uid!=0' | mysql --silent drupaldatabase > userlist
for username in `cat userlist`; do drush user-cancel $username -y; done

This method is both relatively slow (1 user/s) and safe. It doesn't work with special UTF-8 character names and names with spaces.

For Drupal 8 with drush under Linux (with bash) you can use following solution:

    echo 'select name from users_field_data where status=0 and uid!=0' | mysql --silent drupaldatabase > userlist
    for username in `cat userlist`; do drush user-cancel $username -y; done

This is both rather slow (1 user/s) and safe. It doesn't work with special UTF-8 character names and names with spaces.

added 5 characters in body
Source Link
Loading
Source Link
Loading