Cogflake Cogflake

May 06, 2024

PmWiki

www.wintersoasis.com

edit

Search

Confirm

Login.Confirm History

Hide minor edits - Show changes to output

Changed line 20 from:
grep "^${user}:" ${AuthUserExtra} | while read --IFS:: username fname lname phone email pagecode pass
to:
grep "^${user}:" ${AuthUserExtra} | while read --IFS:: username email pagecode pass
Changed line 35 from:
echo "${username}:${fname}:${lname}:${phone}:${email}:0:${newcrypt}" >>Temp.AuthUserExtra
to:
echo "${username}:${email}:0:${newcrypt}" >>Temp.AuthUserExtra
Changed line 51 from:
grep "^${user}:" ${AuthUserExtra} | while read --IFS:: username fname lname phone email pagecode pass
to:
grep "^${user}:" ${AuthUserExtra} | while read --IFS:: username email pagecode pass
Changed line 59 from:
echo "${username}:${fname}:${lname}:${phone}:${email}:0:${pass}" >>Temp.AuthUserExtra
to:
echo "${username}:${email}:0:${pass}" >>Temp.AuthUserExtra
Added lines 1-69:
%comment% AuthUserSignup VERSION 2010-04-14 %%
(:linebreaks:)
{(wikish source {$FullName}#finishsignup)}


(:if false:)
[[#finishsignup]]
wikish_form process
if test -z ${user} || test -z ${code} || test ${code} == 0
then
echo "Please use the link provided in the email to access this page."
exit
fi
set -s AuthUserExtra = "SiteAdmin.AuthUserExtra"
set -s PAGEVARS = '' # suppress fmtpagename due to funky chars in passwd
if test -n ${newpass}
then
read --clear
# ANY CHANGE TO THE FIELDS REQUIRES A CHANGE ON THE LINE BELOW
grep "^${user}:" ${AuthUserExtra} | while read --IFS:: username fname lname phone email pagecode pass
do
if test ${pagecode} == ${code}
then
set -s newpass = 'a${RANDOM}'
set -s newcrypt = '`crypt ${newpass}`'
# Change the password in AuthUser if the username is confirmed there
if grep -q "^${username}:" SiteAdmin.AuthUser
then
grep -v "^${username}:" >SiteAdmin.AuthUser
echo "${username}:${newcrypt}" >>SiteAdmin.AuthUser
fi
# Now change the password in AuthUserExtra (also zero the code)
grep -v '^${username}:' ${AuthUserExtra} >Temp.AuthUserExtra
# ANY CHANGE TO THE FIELDS REQUIRES A CHANGE ON THE LINE BELOW
echo "${username}:${fname}:${lname}:${phone}:${email}:0:${newcrypt}" >>Temp.AuthUserExtra
cp -q Temp.AuthUserExtra ${AuthUserExtra}
echo "Password changed for user ${username}. The new password is '''${newpass}'''. It is recommended to go directly to [[Login.Signup]] to change your password."
exit
fi
done
echo "%red%Error: Your email link is not synchronized with the state of the password file. Please reissue your change-password request.%%"
else
if grep -q "^${user}:" SiteAdmin.AuthUser
then
echo "User ${user} already exists. Cannot add this user."
exit
fi

read --clear
# ANY CHANGE TO THE FIELDS REQUIRES A CHANGE ON THE LINE BELOW
grep "^${user}:" ${AuthUserExtra} | while read --IFS:: username fname lname phone email pagecode pass
do
if test ${pagecode} == ${code}
then
echo "${username}:${pass}" >>SiteAdmin.AuthUser
# Now make the code from a random number to a 0 to indicate it's confirmed
grep -v '^${username}:' ${AuthUserExtra} >Temp.AuthUserExtra
# ANY CHANGE TO THE FIELDS REQUIRES A CHANGE ON THE LINE BELOW
echo "${username}:${fname}:${lname}:${phone}:${email}:0:${pass}" >>Temp.AuthUserExtra
cp -q Temp.AuthUserExtra ${AuthUserExtra}
echo "User ${username} confirmed. You may log in immediately by clicking on [[Confirmed?action=logout|this link]]. "
echo "(By clicking on this link you will automatically be logged OUT before allowing you to log in again.)"
exit
fi
done
echo "Please use the link provided in the email to access this page." # Actually a wrong code, but let's avoid encouraging them trying a million times
fi
[[#finishsignupend]]
(:ifend:)

Page Actions

Recent Changes

Group & Page

Back Links