Koha-clms/Koha/Schema/Result
Maxime Beaulieu d5abcbc8f3 Bug 8753 - Add forgot password link to OPAC
I've addressed a lot of Liz Rea's points.

1.  I have moved the code from updatedatabase.pl and kohastructure.sql to a file in the atomicupdates directory.
1a. The feature is now off by default when the atomicupdate is run.

2.  The password reset link is now visible on the home page, in the modal box and on opac-user.pl .

3.  The password recovery pages now use bootstrap markup.

4.  I am unsure here. I see "New Password:" and "Confirm new password:".

5.  This should still work :).

6.  I could not reproduce.

7.  I have added the userid field.
    You can now reset the password by submitting either your useid or email address.
    Both fields can be filled, but the email address must be one of the borrower's (email, emailpro or b_email).
    When entering only the email address and two borrowers use that same address, the system tells the user to try with another address or to specify his userid.

8.  The text is in the atomicupdate file. Have at it, anyone.

Concerning the email. It is inconvenient for the use to have to wait X minutes for the message queue the be processed.
Maybe we could add a sub in Letters.pm that:
    Takes the same argments as EnqueueLetter
    Sends the letter.
    Saves the letter in the message queue with a 'sent' status.

 TEST PLAN:

Setup)
    1) apply the patch
    2) go to system preferences OPAC>>Privacy and set 'OpacResetPassword' to ON.
    2b) make sure that OpacPasswordChange is also ON.
A)
    1) refresh front page, click on 'Forgot your password' and enter a VALID address
    1b) Also try an INVALID address (valid yet not in your koha db).  An error message will show up.
    2) An email should be received at that address with a link.
    3) Follow the link in the mail to fill the new password.
    Until a satisfactory new password is entered, the old password is not reset.
    4) Go to main page try the new password.
B)
    1) Repeat the password reset, this time use the userid (username) field.
    2) Try to reset the password using a userid and an email not linked to the account. An error appears.
    3) Make sure the borrower has many available email addresses.
    4) For each email, reset the password using both the userid and the email. The link should be sent to the specified address
C)
    1) Make sure two borrowers use the same email.
    2) Repeat the reset procedure in test case A). An error message appears

http://bugs.koha-community.org/show_bug.cgi?id=13068

 Author:    Maxime Beaulieu <maxime.beaulieu@inlibro.com>

Followed test plan. Works as described.
Signed-off-by: Marc Veron <veron@veron.ch>

New sign-off after testing all patches together
Signed-off-by: Marc Veron <veron@veron.ch>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
2016-01-27 06:40:53 +00:00
..
Accountline.pm Bug 12558: DBIx::Class schema update 07/2014 2014-07-11 16:26:23 -03:00
Accountoffset.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
ActionLog.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
ActionLogs.pm Bug 8798: DBIx::Class base classes for all Koha tables 2013-10-14 21:07:24 +00:00
AdditionalField.pm Bug 10855: (RM followup) DBIx update 2015-10-02 15:14:22 -03:00
AdditionalFieldValue.pm Bug 10855: (RM followup) DBIx update 2015-10-02 15:14:22 -03:00
Alert.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Aqbasket.pm Bug 12558: DBIx::Class schema update 07/2014 2014-07-11 16:26:23 -03:00
Aqbasketgroup.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Aqbasketuser.pm Bug 7295: (follow-up) update DBIx::Class schema classes 2013-10-31 16:37:34 +00:00
Aqbookseller.pm 10402: DBIx::Class schema update 2014-08-26 11:55:40 -03:00
Aqbudget.pm Bug 13007: DBIC updates 2015-02-09 15:52:24 -03:00
Aqbudgetborrower.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Aqbudgetperiod.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
AqbudgetsPlanning.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Aqcontact.pm 10402: DBIx::Class schema update 2014-08-26 11:55:40 -03:00
Aqcontract.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Aqinvoice.pm Bug 12558: DBIx::Class schema update 07/2014 2014-07-11 16:26:23 -03:00
Aqorder.pm Bug 11006: (RM followup) DBIx updates 2015-05-14 11:30:00 -03:00
AqorderUser.pm Bug 12648: (RM followup) DBIx schema update 2015-03-11 11:52:47 -03:00
AqordersItem.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
AqordersTransfer.pm Bug 12558: DBIx::Class schema update 07/2014 2014-07-11 16:26:23 -03:00
AudioAlert.pm Bug 11431: (QA followup) Simplify audio_alert_id to just id 2015-11-04 12:33:10 -03:00
AuthHeader.pm Bug 11165: (RM followup) DBIx updates 2015-04-29 15:10:05 -03:00
AuthSubfieldStructure.pm Bug 8480: (RM followup) DBIx updates 2015-05-18 11:24:12 -03:00
AuthTagStructure.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
AuthType.pm Bug 8480: (RM followup) DBIx updates 2015-05-18 11:24:12 -03:00
AuthorisedValue.pm Bug 12601: (RM followup) DBIx updates 2015-02-05 15:21:51 -03:00
AuthorisedValuesBranch.pm Bug 10363: There is no package for authorised values. 2015-10-19 12:46:27 -03:00
Biblio.pm Bug 3206: (RM followup) DBIx updates 2015-07-08 15:15:53 -03:00
BiblioFramework.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Biblioimage.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Biblioitem.pm Bug 14544: [QA Follow-up] DBIx::Class changes 2015-11-05 10:00:31 -03:00
Borrower.pm Bug 15478 - Checksum mismatch when regenerating schema 2016-01-07 18:48:53 +00:00
BorrowerAttribute.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
BorrowerAttributeType.pm Bug 13379: (RM followup) DBIx updates 2015-01-13 13:26:11 -03:00
BorrowerAttributeTypesBranch.pm Bug 12558: DBIx::Class schema update 07/2014 2014-07-11 16:26:23 -03:00
BorrowerDebarment.pm Bug 8007: Discharge - DBIx changes 2015-04-30 12:33:49 -03:00
BorrowerFile.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
BorrowerMessagePreference.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
BorrowerMessageTransportPreference.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
BorrowerModification.pm Bug 10020: (RM followup) DBIx update 2015-10-06 10:39:26 -03:00
BorrowerPasswordRecovery.pm Bug 8753 - Add forgot password link to OPAC 2016-01-27 06:40:53 +00:00
BorrowerSync.pm Bug 11401: DBIx updates 2014-11-14 09:58:40 -03:00
Branch.pm Bug 8836: Update DBIx 2014-11-06 15:28:19 -03:00
BranchBorrowerCircRule.pm Bug 14045: DBIC Changes 2015-10-13 11:13:24 -03:00
BranchItemRule.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
BranchTransferLimit.pm Bug 12781: DBIx::Class schema update 08/2014 2014-08-21 09:35:47 -03:00
Branchcategory.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Branchrelation.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Branchtransfer.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Browser.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
CategoriesBranch.pm Bug 12558: DBIx::Class schema update 07/2014 2014-07-11 16:26:23 -03:00
Category.pm Bug 12781: DBIx::Class schema update 08/2014 2014-08-21 09:35:47 -03:00
City.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
ClassSortRule.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
ClassSource.pm Bug 12558: DBIx::Class schema update 07/2014 2014-07-11 16:26:23 -03:00
Collection.pm Bug 8836: Update DBIx 2014-11-06 15:28:19 -03:00
CollectionsTracking.pm Bug 12781: DBIx::Class schema update 08/2014 2014-08-21 09:35:47 -03:00
ColumnsSetting.pm Bug 10212: Columns configuration for tables - DB changes 2014-08-26 09:28:11 -03:00
Course.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
CourseInstructor.pm Bug 12558: DBIx::Class schema update 07/2014 2014-07-11 16:26:23 -03:00
CourseItem.pm Bug 14205: (RM followup) DBIx updates 2015-09-02 09:56:49 -03:00
CourseReserve.pm Bug 14205: (RM followup) DBIx updates 2015-09-02 09:56:49 -03:00
CreatorBatch.pm Bug 12558: DBIx::Class schema update 07/2014 2014-07-11 16:26:23 -03:00
CreatorImage.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
CreatorLayout.pm Bug 12194: (RM followup) DBIx update 2015-10-22 10:34:13 -03:00
CreatorTemplate.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Currency.pm Bug 9593: update DBIC files 2014-05-04 22:05:31 +00:00
DefaultBorrowerCircRule.pm Bug 14045: DBIC Changes 2015-10-13 11:13:24 -03:00
DefaultBranchCircRule.pm Bug 14045: DBIC Changes 2015-10-13 11:13:24 -03:00
DefaultBranchItemRule.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
DefaultCircRule.pm Bug 14045: DBIC Changes 2015-10-13 11:13:24 -03:00
Deletedbiblio.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Deletedbiblioitem.pm Bug 13523: DBIC updates 2015-02-24 14:20:31 -03:00
Deletedborrower.pm Bug 15478 - Checksum mismatch when regenerating schema 2016-01-07 18:48:53 +00:00
Deleteditem.pm Bug 13023: (RM followup) DBIx updates 2015-04-23 12:46:48 -03:00
Discharge.pm Bug 14368: (RM followup) DBIx update 2015-09-28 12:09:40 -03:00
ExportFormat.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Fieldmapping.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
HoldFillTarget.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
ImportAuth.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
ImportBatch.pm Bug 7131: (follow-up) update DBIx::Class schema classes 2013-10-30 04:35:17 +00:00
ImportBiblio.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
ImportItem.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
ImportRecord.pm Bug 12558: DBIx::Class schema update 07/2014 2014-07-11 16:26:23 -03:00
ImportRecordMatch.pm Bug 12558: DBIx::Class schema update 07/2014 2014-07-11 16:26:23 -03:00
Issue.pm Bug 14978: (RM followup) DBIx update 2015-11-04 12:32:56 -03:00
Issuingrule.pm Bug 9129 - Update schema 2015-12-31 15:29:13 +00:00
Item.pm Bug 15478 - Update the remaining schema files that do not match the db schema 2016-01-07 18:48:54 +00:00
ItemCirculationAlertPreference.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
ItemsLastBorrower.pm Bug 14945 - Add the ability to store the last patron to return an item 2015-12-31 19:32:20 +00:00
ItemsSearchField.pm Bug 12601: (RM followup) DBIx updates 2015-02-05 15:21:51 -03:00
Itemtype.pm Bug 10937: (RM followup) DBIx update 2015-10-22 11:11:49 -03:00
LanguageDescription.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
LanguageRfc4646ToIso639.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
LanguageScriptBidi.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
LanguageScriptMapping.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
LanguageSubtagRegistry.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Letter.pm Bug 9016: (follow-up) update DBIC schema classes 2014-05-02 20:29:18 +00:00
Linktracker.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Localization.pm Bug 14100: (RM followup) DBIx update 2015-10-27 12:52:22 -03:00
MarcMatcher.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
MarcModificationTemplate.pm Bug 8015: (follow-up) update DBIx::Class schema classes 2013-10-31 22:51:13 +00:00
MarcModificationTemplateAction.pm Bug 15095: (RM followup) DBIx update 2015-11-05 10:40:24 -03:00
MarcSubfieldStructure.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
MarcTagStructure.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Matchcheck.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
MatcherMatchpoint.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Matchpoint.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
MatchpointComponent.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
MatchpointComponentNorm.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Message.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
MessageAttribute.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
MessageQueue.pm Bug 7793: DBRev 3.21.00.010 2015-06-22 16:51:03 -03:00
MessageTransport.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
MessageTransportType.pm Bug 9016: (follow-up) update DBIC schema classes 2014-05-02 20:29:18 +00:00
MiscFile.pm Bug 3050: (follow-up) update DBIC schema classes 2014-05-25 21:17:39 +00:00
NeedMergeAuthority.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Notify.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
OaiSet.pm Bug 3206: (RM followup) DBIx updates 2015-07-08 15:15:53 -03:00
OaiSetsBiblio.pm Bug 3206: (RM followup) DBIx updates 2015-07-08 15:15:53 -03:00
OaiSetsDescription.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
OaiSetsMapping.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
OldIssue.pm Bug 13790: (RM followup) DBIx updates 2015-04-23 13:06:00 -03:00
OldReserve.pm Bug 9809: Update Schema files 2015-08-26 10:26:13 -03:00
OpacNews.pm Bug 14246: Adding Koha::Schema::Result differences 2015-10-27 15:57:10 -03:00
Overduerule.pm Bug 15478 - Update the remaining schema files that do not match the db schema 2016-01-07 18:48:54 +00:00
OverduerulesTransportType.pm Bug 15478 - Update the remaining schema files that do not match the db schema 2016-01-07 18:48:54 +00:00
PatronList.pm Bug 10565: (follow-up) refresh DBIC schema class files 2013-10-14 21:35:11 +00:00
PatronListPatron.pm Bug 10565: (follow-up) refresh DBIC schema class files 2013-10-14 21:35:11 +00:00
Patronimage.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
PendingOfflineOperation.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Permission.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
PluginData.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Printer.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
PrintersProfile.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Quote.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Rating.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
RepeatableHoliday.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
ReportsDictionary.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Reserve.pm Bug 9809: Update Schema files 2015-08-26 10:26:13 -03:00
Review.pm Bug 12558: DBIx::Class schema update 07/2014 2014-07-11 16:26:23 -03:00
SavedReport.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
SavedSql.pm Bug 2969: Update DBIx 2014-10-24 10:02:01 -03:00
SearchHistory.pm Bug 11430: (RM followup) DBIx schema update 2015-03-11 15:14:30 -03:00
Serial.pm Bug 15478 - Update the remaining schema files that do not match the db schema 2016-01-07 18:48:54 +00:00
Serialitem.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
ServicesThrottle.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Session.pm Bug 13606: (RM followup) DBIx updates 2015-04-23 13:22:41 -03:00
SocialData.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
SpecialHoliday.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Statistic.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Subscription.pm Bug 12558: DBIx::Class schema update 07/2014 2014-07-11 16:26:23 -03:00
SubscriptionFrequency.pm Bug 7688: (follow-up) update DBIx::Class schema classes 2013-10-30 02:42:40 +00:00
SubscriptionNumberpattern.pm Bug 7688: (follow-up) update DBIx::Class schema classes 2013-10-30 02:42:40 +00:00
Subscriptionhistory.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Subscriptionroutinglist.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Suggestion.pm Bug 13006: (RM followup) DBIx schema update 2015-04-13 11:07:01 -03:00
Systempreference.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Tag.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
TagAll.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
TagsApproval.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
TagsIndex.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
TmpHoldsqueue.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
TransportCost.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
UploadedFile.pm Bug 14321: (RM followup) DBIx update 2015-09-25 15:22:07 -03:00
UserPermission.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Userflag.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00
Virtualshelfcontent.pm Bug 14544: [QA Follow-up] DBIx::Class changes 2015-11-05 10:00:31 -03:00
Virtualshelfshare.pm Bug 12558: DBIx::Class schema update 07/2014 2014-07-11 16:26:23 -03:00
Virtualshelve.pm Bug 14544: (RM followup) DBIx update 2015-11-05 10:40:57 -03:00
Z3950server.pm Bug 6536: (RM followup) make DBIx::Class::Schema::Loader happy 2014-09-01 10:25:25 -03:00
Zebraqueue.pm Bug 8798: (follow-up) update the DBIC schema class files 2013-10-14 21:08:03 +00:00