Skip to content

Fix registration for existing users

Boros Gábor requested to merge omar/login into master

Created by: omarkhan

I noticed a bug in the beta registration after I deployed it to stage. If you are already logged in, but have not yet registered, the form will not allow you to register ('username is already taken'). This pull request fixes the bug by ignoring the logged in user when checking for existing usernames and emails.

Testing

  1. Create a new user in the admin or the shell
  2. Log in as that user
  3. Go to /registration/. The username and email fields should be prepopulated and read only, and the password fields should not appear.
  4. Fill in and submit the form

Merge request reports