[Koha-devel] User password reset question

Graham, Stephen s.graham4 at herts.ac.uk
Tue Mar 27 08:53:26 CEST 2018


Thanks Josef – I couldn’t see the Koha::Patron module listed at: https://perldoc.koha-community.org/16.11.x/ . But It is there on our Koha server. Looking at the perldoc for that module I can see the update_password method. Will give it a go!

Cheers, Stephen

From: Josef Moravec <josef.moravec at gmail.com>
Sent: 26 March 2018 16:25
To: Graham, Stephen <s.graham4 at herts.ac.uk>
Cc: koha-devel at lists.koha-community.org
Subject: Re: [Koha-devel] User password reset question

Hi Stephen, you can use

Koha::AuthUtils::hash_password to encode password and then Koha::Patron->update_password($userid, $newPassword)

you can see it in members/member-password.pl<http://member-password.pl> script on lines 73 and 76 in 16.11 code
Hope that helps

Josef


po 26. 3. 2018 v 17:09 odesílatel Graham, Stephen <s.graham4 at herts.ac.uk<mailto:s.graham4 at herts.ac.uk>> napsal:
Hi All – if I wanted to programmatically change a user’s password what would the best way of doing this? I’ve just been looking at the various Perl modules for our version of Koha (16.11). modules such as C4:Members, C4:Member:Attributes  etc, but cannot see any methods that can reset the password. Looking at the opac-passwd.pl<http://opac-passwd.pl> CGI script which is called when changing a user password, I see that it uses a SQL update to change the password. Is this the best route to go if I wanted to change a password?

Cheers, Stephen

--------------------------------------
Stephen Graham
Library Technology Consultant
Content and Collections Team
Library and Computing Services
University of Hertfordshire
Tel: 01707 286111
Ext: 77751
Email: s.graham4 at herts.ac.uk<mailto:s.graham4 at herts.ac.uk>


_______________________________________________
Koha-devel mailing list
Koha-devel at lists.koha-community.org<mailto:Koha-devel at lists.koha-community.org>
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20180327/3bbaa4a8/attachment-0001.html>


More information about the Koha-devel mailing list