Feature: Manage password reset

  • Extend LDPuser model with:
    • an "email+username" hash colum
    • a password_reset column
  • Add a signal to generate this extended model instance every time a user is created
  • When importing users
    • generate the hash
    • default 0/False to the password_reset column
  • Add a django URL: /reinitialization?hash=thegeneratedhash
    • Add the associated view and template
    • Add a POST method associated with this view
    • On the view:
      • the value of hash should be passed in a hidden_field
      • two fields should appear, password and password_confirm
      • When POSTing, we retrieve the user from its hash (passed in the data)
      • we check if password_reset == 0, if so:
        • We update the password
        • We set the password_resetted to 1
      • else, we send an error to the user
Edited by Benoit Alessandroni