+ USUŃ KONTO

This commit is contained in:
Dominika Liberda 2020-11-06 00:36:08 +01:00
parent 1d3e54e085
commit a3eca1210b
3 changed files with 8 additions and 1 deletions

1
secret/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
*

View file

@ -1 +0,0 @@

View file

@ -78,3 +78,10 @@ function session_get_username() {
unset IFS unset IFS
echo ${data[0]} echo ${data[0]}
} }
# THIS FUNCTION IS DANGEROUS
# delete_account(username)
function delete_account() {
[[ "$1" == "" ]] && return
sed -i "s/^$1:.*//;/^$/d" secret/users.dat
}