Lines 861-868
sub generate_userid {
Link Here
|
861 |
my $userid; |
861 |
my $userid; |
862 |
my $offset = 0; |
862 |
my $offset = 0; |
863 |
my $patron = Koha::Patron->new; |
863 |
my $patron = Koha::Patron->new; |
864 |
my $firstname = $self->firstname; |
864 |
my $firstname = $self->firstname // q{}; |
865 |
my $surname = $self->surname; |
865 |
my $surname = $self->surname // q{}; |
866 |
#The script will "do" the following code and increment the $offset until the generated userid is unique |
866 |
#The script will "do" the following code and increment the $offset until the generated userid is unique |
867 |
do { |
867 |
do { |
868 |
$firstname =~ s/[[:digit:][:space:][:blank:][:punct:][:cntrl:]]//g; |
868 |
$firstname =~ s/[[:digit:][:space:][:blank:][:punct:][:cntrl:]]//g; |
869 |
- |
|
|