root/feedmelinks/bin/snuff-these-users.sh

Revision 1325, 0.7 kB (checked in by jm3, 2 years ago)

refactored perl and shell scripts so they all use the new config mechanism

  • Property svn:executable set to *
Line 
1 #!/bin/sh
2 # snuff a list of users passed in on the command line
3 # FIXME: REMEMBER that this does NOT privatize all their links, tags, etc. -- currently, only snuffing via php does that.
4
5 . env.sh # read in environment config vars
6
7 if [ "$#" -lt 1 ]
8 then
9         echo "usage: $0 username [username] [username]..."
10         exit 1
11 fi
12
13 USERS=$*
14
15 for user in $USERS
16 do
17         mysql -u `get_database_user` -p`get_database_password` `get_database_name` -B -e "update linksUsers set snuffed  = 1 where linksUsers.userid = '$user';"
18         mysql -u `get_database_user` -p`get_database_password` `get_database_name` -B -e "update linksUsers set disabled = 1 where linksUsers.userid = '$user';"
19 done
20
21 exit 0
22
Note: See TracBrowser for help on using the browser.