Login.Signup HistoryHide minor edits - Show changes to markup May 18, 2009, at 12:46 PM
by -
Changed line 5 from:
to:
May 18, 2009, at 12:45 PM
by -
Changed line 5 from:
to:
April 30, 2009, at 03:51 PM
by -
Changed line 52 from:
set -s confirmurl = 'http://www.opensips.org/index.php?n=Login.Confirm' to:
set -s confirmurl = 'http://www.opensips.org/Login/Confirm' April 24, 2009, at 01:19 AM
by -
Deleted lines 1-3:
Signup April 24, 2009, at 01:01 AM
by -
Added lines 2-4:
Signup April 24, 2009, at 12:55 AM
by -
Changed line 2 from:
to:
April 24, 2009, at 12:54 AM
by -
Changed line 2 from:
to:
April 24, 2009, at 12:54 AM
by -
Changed line 2 from:
to:
April 24, 2009, at 12:51 AM
by -
Changed line 2 from:
to:
March 02, 2009, at 02:38 PM
by -
Deleted line 0:
(:messages:) March 01, 2009, at 08:45 PM
by -
Added lines 4-5:
March 01, 2009, at 07:56 PM
by -
Changed line 51 from:
set -s confirmurl = 'http://www.qdk.org/pmwiki/pmwiki.php?n=Login.Confirm' to:
set -s confirmurl = 'http://www.opensips.org/index.php?n=Login.Confirm' Changed line 121 from:
mailx -t -s "Please reply to complete subscription" - "Please click on this link ?code=?user=" to:
mailx -t -s "Confirmation request to complete subscription" - "Please click on this link ?code=?user=" February 18, 2009, at 01:25 AM
by -
Added lines 1-296:
(: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:)
(: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
(: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 = } function require { if test -z ${}
then
echo "\\"
set err ++
fi
} wikish_form quickform process set -s confirmurl = 'http://www.qdk.org/pmwiki/pmwiki.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 -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 = 3891
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
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
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 =
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 = ''
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
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 = 31526
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
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."
|
