* fix: registering a duplicate user would prohibit a password reset later

This commit is contained in:
Dominika Liberda 2021-11-24 19:37:51 +01:00
parent c7bc5ddc0c
commit fbadd1bfd6

View file

@ -13,11 +13,10 @@ if [[ "${post_data[login]}" != '' && "${post_data[password]}" != '' && "${post_d
register "${post_data[login]}" "${post_data[password]}" register "${post_data[login]}" "${post_data[password]}"
status=$? status=$?
verification="$RANDOM" verification="$RANDOM"
echo "${post_data[login]}:$mail:$verification:no:0" >> secret/mail.dat
fi fi
if [[ $status == 0 ]]; then if [[ $status == 0 ]]; then
echo "${post_data[login]}:$mail:$verification:no:0" >> secret/mail.dat
sender_name="${cfg[who]}" mailsend "$mail" "OCW mail verification" "Hi ${post_data[login]}, sender_name="${cfg[who]}" mailsend "$mail" "OCW mail verification" "Hi ${post_data[login]},
Your code: $verification Your code: $verification