Bug 22048: Use set_password in create_superlibrarian.pl
authorTomas Cohen Arazi <tomascohen@theke.io>
Thu, 13 Dec 2018 15:34:20 +0000 (12:34 -0300)
committerNick Clemens <nick@bywatersolutions.com>
Fri, 25 Jan 2019 20:15:30 +0000 (20:15 +0000)
Use $patron->set_password instead of update_password. In this case the
'skip_validation' param needs to be set as no password strength checks
are expected.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

misc/devel/create_superlibrarian.pl

index d9789fe..f17b1f5 100755 (executable)
@@ -49,7 +49,7 @@ my $patron = Koha::Patron->new({
     flags        => 1,
 })->store;
 
-$patron->update_password( $userid, $password );
+$patron->set_password({ password => $password, skip_validation => 1 });
 
 =head1 NAME