Submitter
SUPPORT TOPIC File Information
- Submitted: Dec 27 2007 11:15 AM
- Last Updated: Sep 09 2009 10:21 AM
- File Size: 9.88K
- Views: 2869
- Downloads: 601
Previous Versions
Download membership_validator
2 x Snippets by Cris D. ( member_validator1.0 and member_verifier2.0 )
Date: 2007/12/27
Uses: Allows users of an etomite site to create their own account.
Notes: the account role, permissions and document groups can be set in the snippet
All form fields are validated.
All returned language is abstracted out ready for translation.
UPDATED 2009-09-09
V2.0 membership_verifier has increased security to stop hacking attempts.
For additional security from spam accounts and robots, turn on captcha in the authenticate_visitor snippet.
Warning:
Some of this configuration requires some knowledge of document and group permissions, this can be hazardous if not set properly as you may intentionally give everyone access to everything (including the manager) in your site. Also, as this uses advanced permissions, if your site is set up with simple permissions, you may need to change some snippets to accommodate the new permissions, otherwise you may give the public access to parts of your site that are no longer protected (eg any snippets that rely on API's checkPermissions() or userLoggedIn() will return 'true' regardless of the users role).
If you are new to etomite it is recommended that you start with something easier! But if you are up for the challenge and need help, see the forums for assistance.
Contents of the attached README file:
README for the Membership Validator module
In this zip is an amended membership_validator1.1 snippet with the following changes:
//changelog for 1.1:
//changed the wrapping "<p>" to make the form validate
//added the missing phone validation code and error messages
//added the missing formChunkName so that an external chunk can be used to display the form
//improved the email_switch
//added a sample member_validator_chunk.txt file to use of an external chunk is required.
1) Enable access permissions and visitor permissions in your Etomite manager.
2) Create the new role you want your members to belong to and note the name eg 'automembers'.
3) In permissions, user groups, create a new user group eg 'downloaders'.
4) In permissions, document groups, create a new document group egg 'music'.
5) in permissions, user / document group links, create the document/group link.
6) Copy and paste the contents of the snippet membership_validator into the snippet library.
7) Copy and paste the contents for the snippet membership_verifier into the snippet library.
8) Create a new page where your members will be re-directed on clicking their email link, I suggest putting it
in the repository and 'not show in the menu' for additional security: this is the 'confirmationPage'.
9) Call the snippet membership_verifier in the page and publish it. Take note of the page id.
10) Create and publish a page where your users will create their account, call the snippet membership_validator in it.
11) configure the snippet with the following:
1) Using phpMyAdmin, locate the user role you created earlier in the etomite_user_roles table and locate the id of the role: place it in the snippet config.
2) Set the $tempExpires variable for how long users have to verify their account before the temporary records are
deleted.
3) Set the $confirmationPage page id which will be the page sent in the url in the body of the email with the
verification link.
4) Set the table name that will store your temporary records, and the email address that will appear in the "from"
fields in the validation email.
11) Configure the membership_verifier snippet with the following:
1) Set the id of the page that has your log-in script like 'authenticate_visitor' snippet - (enable captcha for added security).
2) Set the $memberGroup variable to the membergroup name that you set previously in the permissions, user group eg 'downloaders'.
3) Set the tableName to the same name that was used in the membership_validater snippet.
4) Save the snippet changes and your away.
Notes:
If you are testing this by creating test accounts, I have made it hard for surfers to create several accounts, therefore you will also have difficulty. The session username is held in the browser and automatically sent with forms, so you will get a "username and passwords don't match" error if you try to create additional test accounts. You can clear the sessions by
uncommenting
/*
unset($_SESSION['userName']);
unset($_SESSION['firstName']);
unset($_SESSION['lastName']);
unset($_SESSION['email']);
unset($_SESSION['hash']);
*/
, saving the snippet, accessing the page, re-commenting the unsets() and re-saving the snippet. Or clear your browsers sessions via browser tools.
For a live demo, see here.
Date: 2007/12/27
Uses: Allows users of an etomite site to create their own account.
Notes: the account role, permissions and document groups can be set in the snippet
All form fields are validated.
All returned language is abstracted out ready for translation.
UPDATED 2009-09-09
V2.0 membership_verifier has increased security to stop hacking attempts.
For additional security from spam accounts and robots, turn on captcha in the authenticate_visitor snippet.
Warning:
Some of this configuration requires some knowledge of document and group permissions, this can be hazardous if not set properly as you may intentionally give everyone access to everything (including the manager) in your site. Also, as this uses advanced permissions, if your site is set up with simple permissions, you may need to change some snippets to accommodate the new permissions, otherwise you may give the public access to parts of your site that are no longer protected (eg any snippets that rely on API's checkPermissions() or userLoggedIn() will return 'true' regardless of the users role).
If you are new to etomite it is recommended that you start with something easier! But if you are up for the challenge and need help, see the forums for assistance.
Contents of the attached README file:
README for the Membership Validator module
In this zip is an amended membership_validator1.1 snippet with the following changes:
//changelog for 1.1:
//changed the wrapping "<p>" to make the form validate
//added the missing phone validation code and error messages
//added the missing formChunkName so that an external chunk can be used to display the form
//improved the email_switch
//added a sample member_validator_chunk.txt file to use of an external chunk is required.
1) Enable access permissions and visitor permissions in your Etomite manager.
2) Create the new role you want your members to belong to and note the name eg 'automembers'.
3) In permissions, user groups, create a new user group eg 'downloaders'.
4) In permissions, document groups, create a new document group egg 'music'.
5) in permissions, user / document group links, create the document/group link.
6) Copy and paste the contents of the snippet membership_validator into the snippet library.
7) Copy and paste the contents for the snippet membership_verifier into the snippet library.
8) Create a new page where your members will be re-directed on clicking their email link, I suggest putting it
in the repository and 'not show in the menu' for additional security: this is the 'confirmationPage'.
9) Call the snippet membership_verifier in the page and publish it. Take note of the page id.
10) Create and publish a page where your users will create their account, call the snippet membership_validator in it.
11) configure the snippet with the following:
1) Using phpMyAdmin, locate the user role you created earlier in the etomite_user_roles table and locate the id of the role: place it in the snippet config.
2) Set the $tempExpires variable for how long users have to verify their account before the temporary records are
deleted.
3) Set the $confirmationPage page id which will be the page sent in the url in the body of the email with the
verification link.
4) Set the table name that will store your temporary records, and the email address that will appear in the "from"
fields in the validation email.
11) Configure the membership_verifier snippet with the following:
1) Set the id of the page that has your log-in script like 'authenticate_visitor' snippet - (enable captcha for added security).
2) Set the $memberGroup variable to the membergroup name that you set previously in the permissions, user group eg 'downloaders'.
3) Set the tableName to the same name that was used in the membership_validater snippet.
4) Save the snippet changes and your away.
Notes:
If you are testing this by creating test accounts, I have made it hard for surfers to create several accounts, therefore you will also have difficulty. The session username is held in the browser and automatically sent with forms, so you will get a "username and passwords don't match" error if you try to create additional test accounts. You can clear the sessions by
uncommenting
/*
unset($_SESSION['userName']);
unset($_SESSION['firstName']);
unset($_SESSION['lastName']);
unset($_SESSION['email']);
unset($_SESSION['hash']);
*/
, saving the snippet, accessing the page, re-commenting the unsets() and re-saving the snippet. Or clear your browsers sessions via browser tools.
For a live demo, see here.
- 248 Total Files
- 19 Total Categories
- 50 Total Authors
- 131,652 Total Downloads
- TripTracker Gallery Latest File
- Dean Latest Submitter












