A PloneFormGen adapter for subscribe users to the site
Project description
Easily subscribe new user to you Plone site by using a custom PloneFormGen join form
Introduction
The scope of this add-on is to collect join request to your site without enabling the “Enable self-registration” option in the security control panel.
Every join request is stored in a new PloneFormGen adapter called “User Join Adapter”, then site administrator or other power users can “confirm” the request (and create a new site’s member) or discard it.
Configuration
PloneFormGen form
First of all create you Form Folder with all the fields you want to use. Not every field you use must be used as user data, for example you can required fields that will be used by other adapters.
Fields you must include are the ones that ask for the new userid and (probably) the email. The password field is not required (and will not be used) because the adapter will rely onto the Plone native password reset feature.
Please note that a captcha protection is probably something you don’t want to miss. See the PloneFormGen documentation for more.
Adapter configuration
Now create the adapter.
You must properly configure the “Userid form field”, where you must select the form field where you plan to ask form username.
The same must be done for “Email form field” and (optionally) “Fullname form field”.
Please remember to enable the adapter in the PloneFormGen edit form.
Advanced user configuration
Your user configuration fieldset can be different from the Plone default, for example you can have a complex configuration that ask for additional informations like phone number, SSN, …
You can handle this by also filling the “Map additional user’s data” field. For every user properties on the right you can select which form field (on the left) must be used to populate that user info when the user will be finally created.
Groups
You can configure the adapter to automatically add users to one or more groups when the join request will be confirmed.
Manage join requests
By navigate to the adapter a list of join requests is provided.
The table will recap all form fields that you included in the adapter configuration, showing values provided at the form submission. Please note that every form field provided is stored (you can preview all of the data by clicking on the userid link).
Then you can confirm join requests, that means you will create one or more new members, or discard them deleting the data.
As said above, this product will not handle passwords so after a request is confirmed the default site reset password feature is triggered: the user will receive the standard password reset email.
Advanced usage
Integration with Email adapter
This product will not send any email so you probably like to use the standard PloneFormGen mailer adapter if you need to warn power user to evaluate new submissions. To help in this a @@join-detail view is provided.
The adapter will add two new request informations you can use in the mailer (adapter execution orders matters):
- pfguserjoin_obj
Adapter object
- pfguserjoin_newid
Record id of the request
For example you can edit the “Mail-Body Template” as follow:
<html xmlns="http://www.w3.org/1999/xhtml"> <head><title></title></head> <body> <p tal:content="here/getBody_pre | nothing" /> <dl> <tal:block repeat="field options/wrappedFields | nothing"> <dt tal:content="field/fgField/widget/label" /> <dd tal:content="structure python:field.htmlValue(request)" /> </tal:block> </dl> <p tal:content="here/getBody_post | nothing" /> <pre tal:content="here/getBody_footer | nothing" /> <p>Go to the <a tal:attributes="href string:${request/pfguserjoin_obj/absolute_url}/@@join-detail?id:int=${request/pfguserjoin_newid}"> subscription confirmation page </a> </p> </body> </html>
Advanced security
By default this add-on will limit dangerous features to Managers and Site administrators. Please note that a badly configured adapter can open your site to security issues.
- collective.pfg.userjoin: Edit Awkward Fields
This permission is the one that controls who can edit problematic adapter fields (user configuration, groups, …)
- collective.pfg.userjoin: Manage Join Attempts
This permission is the one that controls who can confirm join requests or discard them
- collective.pfg.userjoin: View Sentive Data
By playing with this permission you can limit people able to see submitted data.
Credits
Developed with the support of S. Anna Hospital, Ferrara; S. Anna Hospital supports the PloneGov initiative.
Changelog
0.1.0 (2015-07-10)
Initial release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Hashes for collective.pfg.userjoin-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0fb994f591d2134b3b8f897d5e0aedb8ecc37d56831747bcddc77515e4b700ab |
|
MD5 | 684fbc9e511f546e0c87b97027d5f0b8 |
|
BLAKE2b-256 | 39d946970630853ecf2b64dbfe96182ee4f99abdb9f107fb08b102a9a02a2967 |