]> git.plutz.net Git - cgilite/commitdiff
Bugfix: faulty email address check
authorPaul Hänsch <paul@plutz.net>
Mon, 26 Feb 2024 16:21:53 +0000 (17:21 +0100)
committerPaul Hänsch <paul@plutz.net>
Mon, 26 Feb 2024 16:21:53 +0000 (17:21 +0100)
users.sh

index f60f8a645ff7ae4445737bbf92d58dad8ec913c1..be68a8acbe04ca0864917f92b0aef9541536429a 100755 (executable)
--- a/users.sh
+++ b/users.sh
@@ -274,7 +274,7 @@ user_register(){
   fi
 
   if   [ "$USER_REQUIREEMAIL" = true ]; then
-    if [ ! "email" ]; then
+    if [ ! "$email" ]; then
       REDIRECT "${_BASE}${PATH_INFO}#ERROR_EMAIL_INVALID"
     elif user_emailexist "$email"; then
       REDIRECT "${_BASE}${PATH_INFO}#ERROR_EMAIL_EXISTS"
@@ -342,7 +342,7 @@ user_invite(){
   local email="$(POST email |user_checkemail)"
   local message="$(POST message)"
 
-  if [ ! "email" ]; then
+  if [ ! "$email" ]; then
     REDIRECT "${_BASE}${PATH_INFO}#ERROR_EMAIL_INVALID"
   elif user_emailexist "$email"; then
     REDIRECT "${_BASE}${PATH_INFO}#ERROR_EMAIL_EXISTS"