Registration allowed reactivation and resetting password of disabled
accounts.
Registration didn't correctly check that the account was in 'pending'
state allowing a user to complete the first steps of the procedure before
falling on a SQL error on register/end. But, before the error,
register/end had time to update the state of the accounts table setting:
- the new password (the one defined during the registration procedure)
- the state to 'active'
- the registration state
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>