]> git.plutz.net Git - rawnet/commitdiff
show confirmation message after user registration
authorPaul Hänsch <paul@plutz.net>
Wed, 13 Oct 2021 15:45:59 +0000 (17:45 +0200)
committerPaul Hänsch <paul@plutz.net>
Wed, 13 Oct 2021 15:45:59 +0000 (17:45 +0200)
index.cgi

index e7323cf6452c193fcbb923ed60f0dfc5045cfcc8..2dec18fa91c45a98a27040b1c6115383f476f6fd 100755 (executable)
--- a/index.cgi
+++ b/index.cgi
@@ -96,6 +96,13 @@ case ${PATH_INFO} in
     fi
     ;;
   /register/)
+    if [ "$USER_ID" -a "$(GET user_register)" = confirm ]; then
+      printf 'Refresh: 2; url=%s\r\n' "/${_BASE#/}"
+      yield_page "RAW:NET Register confirm" "message register_confirm" <<-EOF
+       User registration successful!
+       EOF
+      exit 0
+    fi
     yield_page 'RAW:NET Register User' register <<-EOF
        $(w_user_register)
        EOF
@@ -106,7 +113,15 @@ case ${PATH_INFO} in
        EOF
     ;;
   /invite/)
+    if [ "$USER_ID" -a "$(GET user_register)" = confirm ]; then
+      printf 'Refresh: 2; url=%s\r\n' "/${_BASE#/}"
+      yield_page "RAW:NET Account activation" "message invite_confirm" <<-EOF
+       Account activation successful!
+       EOF
+      exit 0
+    fi
     yield_page 'RAW:NET Invite User' invite <<-EOF
+       [nav [a href="../" Channels] - [span Invite]]
        $(w_user_invite)
        EOF
     ;;