Lines 917-924
sub generate_userid {
Link Here
|
917 |
my $userid; |
917 |
my $userid; |
918 |
my $offset = 0; |
918 |
my $offset = 0; |
919 |
my $patron = Koha::Patron->new; |
919 |
my $patron = Koha::Patron->new; |
920 |
my $firstname = $self->firstname; |
920 |
my $firstname = $self->firstname // q{}; |
921 |
my $surname = $self->surname; |
921 |
my $surname = $self->surname // q{}; |
922 |
#The script will "do" the following code and increment the $offset until the generated userid is unique |
922 |
#The script will "do" the following code and increment the $offset until the generated userid is unique |
923 |
do { |
923 |
do { |
924 |
$firstname =~ s/[[:digit:][:space:][:blank:][:punct:][:cntrl:]]//g; |
924 |
$firstname =~ s/[[:digit:][:space:][:blank:][:punct:][:cntrl:]]//g; |
925 |
- |
|
|