From 8f1e940f75d05ad0a1158d30709c19e5e9e3869c Mon Sep 17 00:00:00 2001 From: Magnus Enger Date: Wed, 19 Oct 2022 11:05:29 +0200 Subject: [PATCH] Bug 29480: (follow up) Update POD for generate_userid() Add an explanation of how PatronSelfRegistrationUseridGenerationMethod will affect behaviour. --- Koha/Patron.pm | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Koha/Patron.pm b/Koha/Patron.pm index 272fab6313..7c7a2f7017 100644 --- a/Koha/Patron.pm +++ b/Koha/Patron.pm @@ -1671,9 +1671,19 @@ sub has_valid_userid { my $patron = Koha::Patron->new( $params ); $patron->generate_userid -Generate a userid using the $surname and the $firstname (if there is a value in $firstname). +Default behaviour: -Set a generated userid ($firstname.$surname if there is a $firstname, or $surname if there is no value in $firstname) plus offset (0 if the $userid is unique, or a higher numeric value if not unique). +Generate a userid using the $surname and the $firstname (if there is a value in +$firstname). + +Set a generated userid ($firstname.$surname if there is a $firstname, or +$surname if there is no value in $firstname) plus offset (0 if the $userid is +unique, or a higher numeric value if not unique). + +If PatronSelfRegistrationUseridGenerationMethod is set to 'email', the email +address will be used as the userid. If the patron being created has no email, +or the patron has an email address that is already in use by another patron, +the default way of creating the userid ($firstname.$surname) will be used. =cut -- 2.32.0