# WebLoginPE: Advanced User Management.

## Version 1.3.0

### By Dr. Scotty Delicious, Scientist DFPA.

#### WebLoginPE v. 1.3.0

WebLoginPE is a progressively enhanced (PE), advanced web user management snippet for MODx. WebLoginPE manages user registration, activation, login, logout, password recovery, extended profiling, profile editing, viewing and contacting other users, and user profile removal. WebLoginPE started off as a rewrite of the MODx weblogin snippet so I could make an AJAX login for my site.

WebLoginPE is easy to setup and use, but extremely customizable. You can let WebLoginPE provide the forms and display templates for every view the user might see, or you can use a chunk to customize ANY view. If you are so inclined, you can manage how WebLoginPE will handle selects, radios and checkboxes so that the user's choice is remembered and already selected/checked when they view or edit their profile.

WebLoginPE strives to be standards compliant. The default forms and views are valid XHTML 1.1, however, you can create your own forms and views to use with WebLoginPE in any format you like. WebLoginPE provides the processing and the basic structure. You can use CSS and JavaScript to enhance your forms and views any way you can imagine. Even the sky is no limit for what you can do.

The latest version can always be downloaded from the MODx Repository.

Questions, suggestions, bug reports and feature requests should be posted in the official support thread at the MODx community forums.

#### Installation/Upgrade

##### New Installation

1. Upload the "webloginpe" folder and all it's contents to /assets/snippets/ in your MODx installation.
2. Log into the MODx Manager.
3. Go to "Resources" > "Manage Resources" > "snippets" and click "New snippet"
4. Give this snippet a name of `WebLoginPE` and a description of `<strong>1.2.0</strong> A progressively enhanced, complete Web User management snippet.`
5. Open the file "webloginpe.snippet.php" and copy it's contents to the "Snippet code" area back in the manager.
6. Save the snippet.

##### Upgrade from 1.0 - 1.2.0

1. Upload "webloginpe.class.php", "webloginpe.templates.php", the "js" folder, the "lang" folder and the "Default Forms" folder to "/assets/snippets/webloginpe" in your MODx installation and OVERWRITE or REPLACE the existing files.
2. Paste the NEW contents of webloginpe.snippets.php into the existing WebLoginPE snippet as described above in "New Installation".

#### Change Log

##### 09/13/2007 v. 1.3.0

1. New Parameter: &disableServices which will accept a comma separated list of services to disable. You can disable individual services like "deleteprofile" and "viewprofile" as well as entire types like "register" and "users".
2. New Parameter: &prefixTable If your custom table does not use the MODx table prefix, you can use &prefixTable=`0` (default is 1).
3. New Parameter: &usersList lets you specify multiple lists of users and a format for each list on &type=`users` and &type=`manager`.
4. New Parameter: &tableCheck When you run WebLoginPE, it checks for the existence of the extra user attributes table and creates it if it does not exist. In 1.3.0 it also creates some new Web Access Service Events for plugins if they do not already exist. By setting &tableCheck to 0 (default is 1) you can skip these checks for a little speed bump.
5. New Type: &type=`manager` displays a list of web users with links to edit their profile or delete their profile. Definitely use Access Permissions on this page!
6. Added MODx System Events for most services. See the API documentation for full details.
7. Print CSS by Dimitri Hilverda (Dimmy) added to documentation

##### 09/02/2007 v. 1.2.0

1. WebLoginPE will now function under PHP4. No functions or services were lost.
2. Case insensitive login.
3. Added &type=`users` to view all web users and individual user profiles.
4. Added form input confirmation by with the use of name="inputname.confirm".
5. WebLoginPE messages/errors are now templateable and set in a placeholder so you can display them anywhere on your page or in your forms.
6. email address are verified against a simple regular expression to see if they match a standard email address format.
7. New parameter &inputHandler for super-fine control of your form's <select>, <select multiple>, <input type="radio" /> and <input type="checkbox" /> form elements.

##### 08/23/2007 v. 1.1.1

1. Added parameter &pruneDays to specify number of days to wait before deleting non-activated user accounts (users who have registered but never logged in).
2. Modified &regRequired to eliminate the need for the &captcha parameter.
3. &captcha is now depreciated.
4. Added extended user profile fields with the parameter &customFields.
5. Extended profile table defaults to `web_user_attributes_extended`, but can be overridden with the &customTable parameter.
6. Added parameter &regSuccessId to redirect after successful registration.
7. Added parameter &regSuccessPause to specify a delay (in seconds) before redirecting. Defaults to 5 seconds to give the user time to read the confirmation message.
8. Added parameter &registerSuccessTpl to display a custom chunk instead of redirecting. (only works if &regSuccessId is not set).
9. Added new service "viewprofile" for &type=`profile` to allow users to view the profile of other users.
   (?service=viewprofile&username=Scotty%20Delicious)
10. Added parameter &viewProfileTpl to specify a template for the new "viewprofile" service.
11. Added a simple JavaScript file to force IE compliance with HTML element <button>
12. I think there is more that I am forgetting.

##### 08/20/2007 v. 1.0.2

1. Added parameter &notify to specify email addresses to be notified of new user registrations.
2. Added parameter &notifyTpl to specify notification email message body.
3. Added parameter &notifySubject to specify notification email subject line.
4. Converted all PHP mail() function calls to use the PHPMailer class included with MODx.
5. Added "Terms of Service" agreement and checkbox to the default instant registration template.
6. Fixed placeholders [+user.dob+] and [+user.lastlogin+]. If they are empty or "0", the placeholder is set to "Unknown".
7. Fixed the Instant Login Form so that if there is an error, the fields are filled with the $_POST values so the user doesn't have to fill in all the fields again.

##### 08/19/2007 v. 1.0.1

1. Added parameter &regRequired to specify required input fields by name attribute.
2. Added sanity checks for chunk templates.
3. Added file_exists check for language file. Falls back to English (default) if language file is not found.
4. Added a cookie for persistent login. can be a checkbox named "rememberme" or a select named "stayloggedin".

##### 08/14/2007 v. 1.0

1. Initial Public Release.

Home Parameters Views (Templates) Working with Forms Placeholders API

© 2007 Scotty Delicious.