Last active
August 29, 2015 14:16
-
-
Save jennyq/1c9a70e592008e062a5c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# disable users with @schipul.com or @theassociaton.com or @theassociation.com in email | |
sql="update auth_user set is_superuser=false, is_staff=false, is_active=false where (email like '%@schipul.com' or email like '%@theassocation.com' or email like '%@theassociaton.com' or email like '%@theassociation.com');" | |
sudo -u postgres psql -d tendenci_site -c "$sql" | |
sql="update profiles_profile set status_detail='inactive' where user_id in (select id from auth_user where (email like '%@schipul.com' or email like '%@theassocation.com' or email like '%@theassociaton.com' or email like '%@theassociation.com'));" | |
sudo -u postgres psql -d tendenci_site -c "$sql" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment