validating_registrations.rst 961 B

1234567891011121314151617
  1. ========================
  2. Validating Registrations
  3. ========================
  4. Misago implements simple framework for extending process of new user registration with additional checks.
  5. When user submits registration form with valid data, this data is then passed to functions defined in ``MISAGO_NEW_REGISTRATIONS_VALIDATORS`` setting.
  6. Each function is called with following arguments:
  7. * ``ip:`` IP address using form.
  8. * ``username:`` username for which new account will be created.
  9. * ``email:`` e-mail address for which new account will be created.
  10. If function decides to interrup registration process and thus stop user from registering account, it can raise ``django.core.exceptions.PermissionDenied`` exception, which will result in user receiving "403 Permission Denied" response from site, as well as having his IP address automatically banned for one day.
  11. If none of defined tests raised ``PermissionDenied``, user account will be registered normally.