Bug 13046

Summary: self-registration error with same firstname and lastname!
Product: Koha Reporter: Nguyen Quoc Uy <nguyenquocuy_1102>
Component: System AdministrationAssignee: Bugs List <koha-bugs>
Status: CLOSED WORKSFORME QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: gmcharlt, katrin.fischer, m.de.rooy
Version: 3.16   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:

Description Nguyen Quoc Uy 2014-10-08 19:39:48 UTC
When 2 people self register account on Koha, if they have same firstname and lastname, then they will have same username with different password. Then the second username can not login.
I think we should change the second username to something like firstname.lastname2 if there is an exist username like firstname.lastname.
Comment 1 Marcel de Rooy 2014-10-09 12:09:24 UTC
(In reply to Nguyen Quoc Uy from comment #0)
> When 2 people self register account on Koha, if they have same firstname and
> lastname, then they will have same username with different password. Then
> the second username can not login.
> I think we should change the second username to something like
> firstname.lastname2 if there is an exist username like firstname.lastname.

Hi,
Do not know what your firstname and lastname is btw :)
The code in Members.pm contains two routines for generating the userid.  Generate_Userid generates the suggested userid and Check_Userid does actually check if that userid is not in the database.

I tried to reproduce your problem, but in my case with the same firstname and lastname a userid was generated that was followed by a digit 1. So: firstname.lastname1

I am curious if your problem somehow has to do with special characters or so. Could you give me the exact firstname and lastname to reproduce this error please? Thanks.
Comment 2 Katrin Fischer 2014-10-26 10:55:40 UTC
I also tried to reprocude this on current master and see the same results as Marcel - for me the second person's userid has a number in the end, avoiding a collision.
Comment 3 Marcel de Rooy 2014-10-27 07:49:48 UTC
Closing this report.