diff options
author | Erik Schilling <ablu.erikschilling@googlemail.com> | 2014-02-20 22:43:45 +0100 |
---|---|---|
committer | Erik Schilling <ablu.erikschilling@googlemail.com> | 2014-02-20 22:43:45 +0100 |
commit | 870a8702b83c14091999a9b6183481ae34f5b173 (patch) | |
tree | 085a86ecdc7d69a5a5ab321dfff41c99d1f61087 | |
parent | 6ada5b5ccf7d98bd02fc7f1adc2c4c78ec6968f5 (diff) | |
download | website-870a8702b83c14091999a9b6183481ae34f5b173.tar.gz website-870a8702b83c14091999a9b6183481ae34f5b173.tar.bz2 website-870a8702b83c14091999a9b6183481ae34f5b173.tar.xz website-870a8702b83c14091999a9b6183481ae34f5b173.zip |
Forget clean text password after registration
Currently all passwords stay in the db for ever.
This now deletes no longer required passwords.
Please also run `DELETE FROM tmw_accounts WHERE STATE = 1;`
-rwxr-xr-x | bin/create_account.sh | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/bin/create_account.sh b/bin/create_account.sh index 14fab86..f073a48 100755 --- a/bin/create_account.sh +++ b/bin/create_account.sh @@ -74,15 +74,14 @@ frob_accounts() if grep -q 'successfully created' <<< "$RESULT" then send_email 'Your account was created successfully. Have fun playing The Mana World!' - do_mysql << __EOF__ -update $SQL_TABLE set state = 1 where id = $ID -__EOF__ + STATE=1 else send_email $'Something went wrong when automatically creating your account.\nError message:' "$RESULT" - do_mysql << __EOF__ -update $SQL_TABLE set state = 2 where id = $ID -__EOF__ + STATE=2 fi + do_mysql << __EOF__ +update $SQL_TABLE set state = $STATE, password = '' where id = $ID +__EOF__ done } |