X-Git-Url: https://git.plutz.net/?a=blobdiff_plain;f=cgilite%2Fusers.sh;h=c924789c2e25a6fcb71b7b60eb9980373e9038ec;hb=0daec72fa8a85edebc46c665475f819091f3dac9;hp=18fde077d6a99ec191d8aa016c34addd19c65fc7;hpb=b25024386a4a3ab856dc73707119bd6e50b2da34;p=shellwiki diff --git a/cgilite/users.sh b/cgilite/users.sh index 18fde07..c924789 100755 --- a/cgilite/users.sh +++ b/cgilite/users.sh @@ -17,8 +17,8 @@ [ -n "$include_users" ] && return 0 include_users="$0" -. "${_EXEC}/cgilite/session.sh" -. "${_EXEC}/cgilite/storage.sh" +. "${_EXEC:-.}/cgilite/session.sh" +. "${_EXEC:-.}/cgilite/storage.sh" SENDMAIL=${SENDMAIL-sendmail} @@ -29,9 +29,8 @@ USER_ACCOUNTPAGE="${USER_ACCOUNTPAGE}" USER_ACCOUNTEXPIRE="${USER_ACCOUNTEXPIRE:-$((86400 * 730))}" USER_CONFIRMEXPIRE="${USER_CONFIRMEXPIRE:-86400}" -MAILFROM="${MAILDOMAIN-noreply@${HTTP_HOST%:*}}" - HTTP_HOST="$(HEADER Host)" +MAILFROM="noreply@${HTTP_HOST%:*}" [ "$HTTPS" ] && SCHEMA=https || SCHEMA=http @@ -274,7 +273,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 +341,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"