From 9add683d82b1a6db3cf62be5dca8d16c4d328207 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 25 Jul 2018 19:09:01 -0300 Subject: [PATCH] Bug 21087: Fix create_superlibrarian.pl script Signed-off-by: John Doe Signed-off-by: Tomas Cohen Arazi --- misc/devel/create_superlibrarian.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/misc/devel/create_superlibrarian.pl b/misc/devel/create_superlibrarian.pl index 89b738783f..938d34ea13 100755 --- a/misc/devel/create_superlibrarian.pl +++ b/misc/devel/create_superlibrarian.pl @@ -40,7 +40,7 @@ pod2usage("branchcode is mandatory") unless $branchcode; pod2usage("categorycode is mandatory") unless $categorycode; pod2usage("cardnumber is mandatory") unless $cardnumber; -Koha::Patron->new({ +my $patron = Koha::Patron->new({ surname => $surname, userid => $userid, cardnumber => $cardnumber, @@ -50,6 +50,9 @@ Koha::Patron->new({ flags => 1, })->store; +my $digest = Koha::AuthUtils::hash_password($password); +$patron->update({password => $digest,}); + =head1 NAME create_superlibrarian.pl - create a user in Koha with superlibrarian permissions -- 2.39.5