Hide minor edits - Show changes to markup
set -s create_edit = # Default if not over-ridden below
set -s create_edit = # Default if not over-ridden below
To view and alter your user details:
enter your username and password, click “Load Form, then edit in the form on the left”
To view and alter your user details:
enter your username and password, click “Load Form”, then edit in the form on the left
To view and edit your user details in the form on the left:
enter your username and password, then click “Load Form”
To view and alter your user details:
enter your username and password, click “Load Form, then edit in the form on the left”
(:if equal "${create_edit}" "${CreateNewUser}":)To create a user ID:\\fill in the form and press “” :(:else:)Make any changes and press “” to modify the information on this user.(:ifend:)
(:if equal "${create_edit}" "${CreateNewUser}":)To create a user ID:
fill in the form and press “” :(:else:)Make any changes and press “” to modify the information on this user.(:ifend:)
To view and edit your user details in the form on the left:\\enter your username and password, then click “Load Form”
To view and edit your user details in the form on the left:
enter your username and password, then click “Load Form”
(:if equal "${create_edit}" "${CreateNewUser}":)To create a user ID:<br/>fill in the form and press “” :(:else:)Make any changes and press “” to modify the information on this user.(:ifend:)
(:if equal "${create_edit}" "${CreateNewUser}":)To create a user ID:\\fill in the form and press “” :(:else:)Make any changes and press “” to modify the information on this user.(:ifend:)
To view and edit your user details in the form on the left:<br/>enter your username and password, then click “Load Form”
To view and edit your user details in the form on the left:\\enter your username and password, then click “Load Form”
(:if equal "${create_edit}" "${CreateNewUser}":)To create a user ID: fill in the form and press “” :(:else:)Make any changes and press “” to modify the information on this user.(:ifend:)
(:if equal "${create_edit}" "${CreateNewUser}":)To create a user ID:<br/>fill in the form and press “” :(:else:)Make any changes and press “” to modify the information on this user.(:ifend:)
To view and edit your user details in the form on the left: enter your username and password, then click “Load Form”
To view and edit your user details in the form on the left:<br/>enter your username and password, then click “Load Form”
Enter your username and password, then click “Load Form” to view and edit your user details in the form on the left
To view and edit your user details in the form on the left: enter your username and password, then click “Load Form”
(:if equal "${create_edit}" "${CreateNewUser}":)Fill in the form and press “” to create a user ID:(:else:)Make any changes and press “” to modify the information on this user.(:ifend:)
(:if equal "${create_edit}" "${CreateNewUser}":)To create a user ID: fill in the form and press “” :(:else:)Make any changes and press “” to modify the information on this user.(:ifend:)
echo “::::::” >>
echo “:::” >>
echo “::::::” >>Temp.AuthUserExtra
echo “:::” >>Temp.AuthUserExtra
grep ‘^:’ | read —initialize —IFS:: username fname lname phone email code readpass
grep ‘^:’ | read —initialize —IFS:: username email code readpass
grep ‘^:’ | read —initialize —IFS:: username fname lname phone email code readpass
grep ‘^:’ | read —initialize —IFS:: username email code readpass
echo “::::::” >>
echo “:::” >>
grep ‘^:’ | read —initialize —IFS:: username fname lname phone email code readpass
grep ‘^:’ | read —initialize —IFS:: username email code readpass
%|| Fname:||(:input text fname:)|| %|| Lname:||(:input text lname:)|| %|| Telephone:||(:input text phone:)||
%|| Fname:||(:input text fname:)|| %|| Lname:||(:input text lname:)|| %|| Telephone:||(:input text phone:)||
Fname: | (:input text fname:) |
Lname: | (:input text lname:) |
Telephone: | (:input text phone:) |
set -s —form fname = set -s —form lname = set -s —form phone =
require fname “You must provide a first name.” require lname “You must provide a last name.”
require fname “You must provide a first name.” require lname “You must provide a last name.”
set -s —form fname = set -s —form lname = set -s —form phone =
set -s —form fname = ‘’ set -s —form lname = ‘’ set -s —form phone = ‘’
(:messages:)
(:if equal "${create_edit}" "${CreateNewUser}":)Fill in the form and press “” to create a user ID:(:else:)Make any changes and press “” to modify the information on this user.(:ifend:)
Username: | (:input text username ${readonly}:) |
Password: | (:input password password:) |
Email: | (:input text email:) |
Fname: | (:input text fname:) |
Lname: | (:input text lname:) |
Telephone: | (:input text phone:) |
(:if [ equal "${create_edit}" "${CreateNewUser}" && auth admin ] :)(:input checkbox bypassconfirm:) Bypass Email Confirmation(:ifend:) (:input submit save_button "${create_edit}":) (:if equal "${create_edit}" "${SaveExistingUser}":)(:input submit del_button "Delete":)(:input submit resend_button "Resend Confirmation Email":)(:ifend:)
Enter your username and password, then click “Load Form” to view and edit your user details in the form on the left
Username: | (:input text edituser:) |
Password: | (:input password editpass:) |
(:input submit load_form "Load Form":) (:input submit forgot_passwd "Forgot Password":)
(:input end:)
(:messages:)
(:if false:) function clearform {
set -s —form username = set -s —form password = set -s —form email = set -s —form fname = set -s —form lname = set -s —form phone = # ANY CHANGE TO THE FIELDS REQUIRES ADDING/DELETING FIELDS IN THIS FUNCTION
} function require {
if test -z ${} then echo “\\” set err ++ fi
} wikish_form quickform process method=POST
set -s confirmurl = ‘http://www.wintersoasis.com/wiki/index.php?n=Login.Confirm’ set -s readonly = ‘’ set -s AuthUserExtra = ‘SiteAdmin.AuthUserExtra’ set -s CreateNewUser = ‘Create New User’ set -s SaveExistingUser = ‘Update Information’ set -s create_edit = # Default if not over-ridden below set -s PAGEVARS = ‘’ # suppress fmtpagename() if ! test -f then
echo “” >
fi if test -n “” then
# # The user has pressed “Save” - validate the data # if test “” ~= “/[^a-z0–9_]/i” then echo “Only alphabetic characters, numeric digits, and underscore are allowed in the username.” exit fi if test “” ~= “/ /” then echo “No spaces allowed in the password.” exit fi # PUT ANY OTHER PASSWORD VALIDATION ROUTINES HERE if test “” == “” then # # We are “saving” the info for a NEW user (not editing existing) # set err = 0 require username “You must provide a username.” require password “You must provide a password.” require email “You must provide an email address.” require fname “You must provide a first name.” require lname “You must provide a last name.” if test -n then if grep -q “^:” SiteAdmin.AuthUser then echo “That user already exists and is confirmed.\\” set err ++ else if grep -q “^:” then echo “That user already exists awaiting confirmation.\\” set err ++ fi fi fi # CHECK FOR ANY DISALLOWED EMAIL DOMAINS HERE if test -gt 0 then echo “Cannot create due to error(s) listed above.” exit fi # OK, I think we’re legitimate at this point - go ahead and add it to the table if test -n && test —pmwiki auth admin then set -s random = 0 else set random = 14147 fi set -s npass = “`crypt ” # ANY CHANGE TO THE FIELDS REQUIRES A CHANGE ON THE LINE BELOW echo “::::::” >> if test -n && test —pmwiki auth admin then echo “:” >>SiteAdmin.AuthUser else # This link must point to the Confirm page with the ?code… appended to the end. # You might want to change the wording on the email since this is pretty basic… mailx -t -s “Please reply to complete subscription” - “Please click on this link ?code=?user=“ fi echo “Success” clearform else # # We are “saving” the info for an existing user (not creating a new user) # set err = 0 require username “You must provide a username.” require password “You must provide a password.” require email “You must provide an email address.” require fname “You must provide a first name.” require lname “You must provide a last name.” # CHECK FOR ANY INVALID EMAIL DOMAINS HERE if test -gt 0 then echo “Cannot create due to error(s) listed above.” exit fi set -s pass_source = ‘authuser’ set -s oldpass = “`grep ‘^:’ SiteAdmin.AuthUser | cut -d: -f2” if test -z then set -s oldpass = “`grep ‘^:’ | cut -d: -f7” set -s pass_source = ‘extra’ fi set -s oldpass = “`trim ” if test “” == “” || test == “`crypt —salt:”“ ” || test —pmwiki auth admin then if test “” == “” # loaded via admin privs, already crypt’d then set -s newpass = “” # the password has been entered in the form - crypt it # NOTE THAT PASSWORD VALIDATION (no space, require numeric, # require uppercase, etc.) # IS NOT BEING DONE HERE AND IT SHOULD PROBABLY BE DONE! else set -s newpass = “`crypt —salt:’‘ ” fi set -s code = “`grep ‘^:’ | cut -d: -f6” grep -v ‘^:’ >Temp.AuthUserExtra # ANY CHANGE TO THE FIELDS REQUIRES A CHANGE ON THE LINE BELOW echo “::::::” >>Temp.AuthUserExtra cp -q Temp.AuthUserExtra if test == ‘authuser’ then grep -v ‘^:’ SiteAdmin.AuthUser >Temp.AuthUser echo ‘:’ >>Temp.AuthUser cp -q Temp.AuthUser SiteAdmin.AuthUser fi echo “Success” clearform else echo “Error. The password does not match.” fi fi
fi if test -n “” then
# # The user filled something in on the RIGHT side form and pressed “load form” # if test -z then echo “Please specify an existing username.” clearform exit fi if test -z && ! test —pmwiki auth admin then echo “Please specify the password for ‘.” clearform exit fi # ANY CHANGE TO THE FIELDS REQUIRES A CHANGE ON THE LINE BELOW grep ‘^:’ | read —initialize —IFS:: username fname lname phone email code readpass if test -z # Presumably does not exist in AuthUserExtra then grep ‘^:’ SiteAdmin.AuthUser | read —initialize —IFS:: username readpass set -s pass_src = authuser else set -s pass_src = extra fi if test -n # We found it in one or the other… then set -s readpass = “`trim ” if test —pmwiki auth admin || test “`crypt —salt: ” == “” then # Set defaults as we found in (they’ll be blank if no AuthUserExtra record) set -s —form username = set -s —form password = set -s —form email = set -s —form fname = set -s —form lname = set -s —form phone = # ANY CHANGE TO THE FIELDS REQUIRES ADDITION/DELETION OF LINES ABOVE set -s readonly = ‘readonly=1′ #Can’t change username else echo “ERROR: Username / Password do not match. ” clearform exit fi else echo “ERROR: Username / Password does not exist. Did you mean to create a new user?” clearform exit fi set -s create_edit =
fi if test -n then
#
# The user pressed the “delete” button
#
if test -z
then
echo “ERROR: Must specify username and load form before deleting”
exit
fi
if grep -q “^:” SiteAdmin.AuthUser
then
grep -v “^:” SiteAdmin.AuthUser >SiteAdmin.AuthUser
fi
if grep -q “^:”
then
grep -v “^:” >
fi
set -s —form username = ‘’
set -s —form password = ‘’
set -s —form email = ‘’
set -s —form fname = ‘’
set -s —form lname = ‘’
set -s —form phone = ‘’
# ANY CHANGE TO THE FIELDS REQUIRES ADDITION/DELETION OF LINES ABOVE
echo “User ‘’ Deleted.”
fi if test -n then
# # The user pressed the “forgot password” link # if test -z then echo “ERROR: Must specify username and load form before resending confirmation” exit fi if ! grep -q “^:” then echo “ERROR: User ‘’ does not exist.” exit fi # Rewrite the authuserextra line for this user with a new code # ANY CHANGE TO THE FIELDS REQUIRES A CHANGE ON THE LINE BELOW grep ‘^:’ | read —initialize —IFS:: username fname lname phone email code readpass if test -z then echo “ERROR: No email address is specified for that user. An administrator must reset your password manually.” exit fi grep -v “^:” > set code = 15927 # ANY CHANGE TO THE FIELDS REQUIRES A CHANGE ON THE LINE BELOW echo “::::::” >> mailx -t -s “Please reply to confirm a password change” - “Please click on this link ?code=?user=?newpass=1″ echo “Request Sent.”
fi if test -n then
#
# The user requested a resend of the confirmation email
#
if test -z
then
echo “ERROR: Must specify username and load form before resending confirmation”
exit
fi
# ANY CHANGE TO THE FIELDS REQUIRES A CHANGE ON THE LINE BELOW
grep ‘^:’ | read —initialize —IFS:: username fname lname phone email code readpass
mailx -t -s “Please reply to complete subscription” - “Please click on this link ?code=?user=“
echo “Resent.”