@@ -, +, @@ BorrowerUnwantedField - add 'userid' in syspref BorrowerUnwantedField - try to create a new patron : /cgi-bin/koha/members/memberentry.pl - there is not input text for userid - choose non-existing surname and firstname - click on save => Without patch : patron is not created, you see the alert message "Username/password already exists" => With patch : patron is created, userid is generated with surname and firstname - remove 'userid' in syspref BorrowerUnwantedField and check it can be defined in patron creation form The issue is there, and this patch fixes it. --- members/memberentry.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) --- a/members/memberentry.pl +++ a/members/memberentry.pl @@ -257,8 +257,9 @@ $newdata{'city'} = $input->param('city') if defined($input->param('city')) $newdata{'zipcode'} = $input->param('zipcode') if defined($input->param('zipcode')); $newdata{'country'} = $input->param('country') if defined($input->param('country')); -#builds default userid -if ( (defined $newdata{'userid'}) && ($newdata{'userid'} eq '')){ +# builds default userid +# userid input text may be empty or missing because of syspref BorrowerUnwantedField +if ( ( defined $newdata{'userid'} && $newdata{'userid'} eq '' ) || $check_BorrowerUnwantedField =~ /userid/ ) { if ( ( defined $newdata{'firstname'} ) && ( defined $newdata{'surname'} ) ) { # Full page edit, firstname and surname input zones are present $newdata{'userid'} = Generate_Userid( $borrowernumber, $newdata{'firstname'}, $newdata{'surname'} ); --