Issue 18170

Duplicated email allowed but can't login

18170
Reporter: cgendreau
Assignee: cgendreau
Type: Bug
Summary: Duplicated email allowed but can't login
Priority: Major
Status: ToDo
Created: 2016-01-25 10:44:00.022
Updated: 2016-01-25 10:44:00.022
        
Description: We can enter 2 persons with the same email but these persons won't be able to login since the email is also used as username for login.

I don't think we should make the email field UNIQUE since there is some institutional email like "director@..." and most of these persons will never have to login.

I also think the email is useful as login because people will remember (as opposed to yet-another-username).

Solutions:
-Add boolean flag can_login with a rule that only one email can have this flag set to true.
-Add a check on login to handle correctly duplicated email and prevent them to login. Also include the information on the "person" page so the admin can easily know why this person can not login.]]>