|
Lines 764-771
sub generate_userid {
Link Here
|
| 764 |
my $userid; |
764 |
my $userid; |
| 765 |
my $offset = 0; |
765 |
my $offset = 0; |
| 766 |
my $patron = Koha::Patron->new; |
766 |
my $patron = Koha::Patron->new; |
| 767 |
my $firstname = $self->firstname; |
767 |
my $firstname = $self->firstname // q{}; |
| 768 |
my $surname = $self->surname; |
768 |
my $surname = $self->surname // q{}; |
| 769 |
#The script will "do" the following code and increment the $offset until the generated userid is unique |
769 |
#The script will "do" the following code and increment the $offset until the generated userid is unique |
| 770 |
do { |
770 |
do { |
| 771 |
$firstname =~ s/[[:digit:][:space:][:blank:][:punct:][:cntrl:]]//g; |
771 |
$firstname =~ s/[[:digit:][:space:][:blank:][:punct:][:cntrl:]]//g; |
| 772 |
- |
|
|