From c87e872278f890cf1a9ab17583431f60786cb566 Mon Sep 17 00:00:00 2001 From: "conan (aka Fernando Canizo)" Date: Wed, 20 Apr 2011 17:04:37 -0300 Subject: [PATCH] Bug 6218: patron gets dot added if no first name Trivial fix, now it choose surname if firstname is empty and behaves like before (firstname.surname) if both are provided. Signed-off-by: Frederic Demians Signed-off-by: Ian Walls Signed-off-by: Chris Cormack --- C4/Members.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Members.pm b/C4/Members.pm index a151e036a5..e03b40b545 100644 --- a/C4/Members.pm +++ b/C4/Members.pm @@ -842,7 +842,7 @@ sub Generate_Userid { do { $firstname =~ s/[[:digit:][:space:][:blank:][:punct:][:cntrl:]]//g; $surname =~ s/[[:digit:][:space:][:blank:][:punct:][:cntrl:]]//g; - $newuid = lc("$firstname.$surname"); + $newuid = lc(($firstname)? "$firstname.$surname" : $surname); $newuid .= $offset unless $offset == 0; $offset++; -- 2.39.5