]> git.plutz.net Git - cgilite/blobdiff - users.sh
automatically swap in confirmation dialog for registration
[cgilite] / users.sh
index b5ebcefaefc912b59a37f374f7bacb10f6481ffb..1959e9de4b757084fad3d850b1b7b771517cb3c3 100755 (executable)
--- a/users.sh
+++ b/users.sh
@@ -105,14 +105,14 @@ user_register(){
       RELEASE "$user_db"
       sendmail -t -f "$MAILFROM" <<-EOF
        From: ${MAILFROM}
-       To: "${email}"
+       To: ${email}
        Subject: Your account registration at ${HTTP_HOST%:*}
 
        Someone tried to sign up for a user account using this email address.
 
        You can activate your account using this link:
 
-           https://${HTTP_HOST%:*}/${_BASE}/?user_confirm=${uid}+$(session_mac "$uid")
+           https://${HTTP_HOST%:*}/${_BASE}${PATH_INFO}?user_confirm=${uid}+$(session_mac "$uid")
 
        This registration link will expire after 24 hours.
 
@@ -259,7 +259,9 @@ user_init
 esac
 
 w_user_register(){
-  if [ "$USER_REGISTRATION" != true ]; then
+  if [ "$(GET user_confirm)" ]; then
+    w_user_confirm
+  elif [ "$USER_REGISTRATION" != true ]; then
     cat <<-EOF
        [div #user_register .disabled
        User Registration is disabled.