21 | | The IRegistrationConfirmation extension point this patch provides makes it easy to add things such as [http://en.wikipedia.org/wiki/CAPTCHA CAPTCHAs] and e-mail confirmation to AccountManagerPlugin's user registration form. For example, SimpleCaptchaPlugin uses this interface. |
| 21 | The IRegistrationConfirmation extension point this patch provides makes it easy to add things such as [http://en.wikipedia.org/wiki/CAPTCHA CAPTCHAs] and e-mail confirmation to AccountManagerPlugin's user registration form. |
| 22 | |
| 23 | The interface provided by IRegistrationConfirmation includes two methods. |
| 24 | |
| 25 | {{{ |
| 26 | class IRegistrationConfirmation(Interface): |
| 27 | """An interface for receiving notification before and after the new user |
| 28 | registration form has been submitted. |
| 29 | """ |
| 30 | |
| 31 | def pre_registration(self, req): |
| 32 | """Returns the markup to be added to the registration form |
| 33 | """ |
| 34 | |
| 35 | def verify_registration(self, req): |
| 36 | """Returns an error message if confirmation fails, or None on success |
| 37 | """ |
| 38 | }}} |
| 39 | |
| 40 | This is a very generalized interface and has not been thoroughly assessed to ensure that it meets all use-case requirements. [http://trac-hacks.org/newticket?component=RegistrationConfirmationPatch&owner=nicholasbs&type=Enhancement Suggestions are welcome]. |
| 41 | |
| 42 | For example, SimpleCaptchaPlugin uses this interface. |