]> git.plutz.net Git - cgilite/blobdiff - users.sh
allow server site message page to confirm registration
[cgilite] / users.sh
index c13703b418fc057adcdc936d26b515c55a3a74f7..7721def9c5c07927502309a9a11ed8e60af523b9 100755 (executable)
--- a/users.sh
+++ b/users.sh
@@ -151,7 +151,7 @@ user_register(){
       RELEASE "$user_db"
 
       debug "Sending Activation Link:" \
-            "https://${HTTP_HOST%:*}/${_BASE}${PATH_INFO}?user_confirm=${uid}+$(session_mac "$uid")"
+            "https://${HTTP_HOST}${_BASE}${PATH_INFO}?user_confirm=${uid}+$(session_mac "$uid")"
       sendmail -t -f "$MAILFROM" <<-EOF
        From: ${MAILFROM}
        To: ${email}
@@ -161,7 +161,7 @@ user_register(){
 
        You can activate your account using this link:
 
-           https://${HTTP_HOST%:*}/${_BASE}${PATH_INFO}?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.
 
@@ -220,7 +220,7 @@ user_invite(){
            >>"$user_db"
     RELEASE "$user_db"
     debug "Sending Invitation Link:" \
-          "https://${HTTP_HOST%:*}/${_BASE}${PATH_INFO}?user_confirm=${uid}+$(session_mac "$uid")"
+          "https://${HTTP_HOST}${BASE}${PATH_INFO}?user_confirm=${uid}+$(session_mac "$uid")"
     sendmail -t -f "$MAILFROM" <<-EOF
        From: ${MAILFROM}
        To: ${email}
@@ -232,7 +232,7 @@ user_invite(){
 
        You can create your account using this link:
 
-           https://${HTTP_HOST%:*}/${_BASE}${PATH_INFO}?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.
 
@@ -278,7 +278,7 @@ user_confirm(){
   elif user_update_user "$UID" uname="$uname" status=active password="$pw"; then
     SESSION_COOKIE new
     SESSION_BIND user_id "$UID"
-    REDIRECT "${_BASE}${PATH_INFO}#USER_REGISTER_CONFIRM"
+    REDIRECT "${_BASE}${PATH_INFO}?user_register=confirm#USER_REGISTER_CONFIRM"
   else
     REDIRECT "${_BASE}${PATH_INFO}#ERROR_USER_NOLOCK"
   fi