[Koha-bugs] [Bug 8753] Add forgot password link to OPAC

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Jan 23 22:27:12 CET 2014


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

--- Comment #23 from M. Tompsett <mtompset at hotmail.com> ---
Comment on attachment 24586
  --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=24586
Bug 8753 - Add forgot password link to OPAC

Review of attachment 24586:
 --> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=8753&attachment=24586)
-----------------------------------------------------------------

::: C4/Auth.pm
@@ +1068,5 @@
>          PatronSelfRegistrationDefaultCategory => C4::Context->preference("PatronSelfRegistrationDefaultCategory"),
>          persona            => C4::Context->preference("Persona"),
>          opac_css_override => $ENV{'OPAC_CSS_OVERRIDE'},
> +        OpacResetPassword => C4::Context->preference("OpacResetPassword"),
> +        OpacPasswordChange => C4::Context->preference("OpacPasswordChange"),

No longer necessary.

::: C4/Members.pm
@@ +2273,5 @@
> +    my $uuid_str;
> +    $uuid_str .= $chars[rand @chars] for 1..32;
> +
> +    #insert into database
> +    my $sth = $dbh->prepare( 'INSERT INTO borrower_password_recovery VALUES (? ,? , ADDDATE(NOW(), INTERVAL 2 DAY) )' );

Is this ANSI SQL?

@@ +2281,5 @@
> +    #define to/from emails
> +    my $kohaEmail = C4::Context->preference( 'KohaAdminEmailAddress' );
> +
> +    #create link
> +    my $uuidLink = "http://" . C4::Context->preference( 'OPACBaseURL' ) . "/cgi-bin/koha/opac-password-recovery.pl?uniqueKey=$uuid_str";

Does someone have that funky code to determine http vs https in a URL handy?
Please don't hard code http.

::: koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref
@@ +556,5 @@
> +              default: 1
> +              choices:
> +                  yes: "On"
> +                  no: "Off"
> +            - ". If On, the user can reset his password on OPAC."

There are prettier ways to format this.
        -
            - "The user "
            - pref: OpacResetPassword
              default: 1
              choices:
                  yes: "can reset"
                  no: "can not reset"
            - " their password on OPAC."

::: koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-password-recovery.tt
@@ +48,5 @@
> +            More than one account has been found for the email address: "<strong>[% email %]</strong>"
> +            <br/>Try yo use your alternative email if you have another.
> +        [% ELSIF (errAlreadyStartRecovery) %]
> +            The process of password recovery has already started for this account ("<strong>[% email %]</strong>")
> +            <br/>Check your emails; you should recieve the link to reset your password.

receive typo.

@@ +74,5 @@
> +
> +[% ELSIF (new_password) %]
> +    [% IF (errLinkNotValid) %]
> +        <span class="TxtErreur"><h6>
> +        We could not authentify you as the account owner.

authenticate

::: koha-tmpl/opac-tmpl/prog/en/modules/opac-auth.tt
@@ +86,5 @@
>  
>  <input type="submit" value="Log In" class="submit" />
> +[% IF Koha.Preference('OpacPasswordChange') && Koha.Preference('OpacResetPassword') %]
> +    <p><a href="/cgi-bin/koha/opac-password-recovery.pl">Forgot your password?</a></p>
> +[% END %]

Could this be in the nologininstructions div?

::: koha-tmpl/opac-tmpl/prog/en/modules/opac-password-recovery.tt
@@ +46,5 @@
> +            More than one account has been found for the email address: "<strong>[% email %]</strong>"
> +            <br/>Try yo use your alternative email if you have another.
> +        [% ELSIF (errAlreadyStartRecovery) %]
> +            The process of password recovery has already started for this account ("<strong>[% email %]</strong>")
> +            <br/>Check your emails; you should recieve the link to reset your password.

receive typo.

@@ +72,5 @@
> +
> +[% ELSIF (new_password) %]
> +    [% IF (errLinkNotValid) %]
> +        <span class="TxtErreur"><h6>
> +        We could not authentify you as the account owner.

authenticate

::: opac/opac-main.pl
@@ +58,4 @@
>      koha_news_count     => $koha_news_count,
>      display_daily_quote => C4::Context->preference('QuoteOfTheDay'),
>      daily_quote         => $quote,
> +    OpacResetPassword   => C4::Context->preference('OpacResetPassword'),

You tweaked opac-main.tt to use the Koha.Preference method of grabbing system
preferences in the template. There's no need to modify this file.

::: opac/opac-password-recovery.pl
@@ +48,5 @@
> +my $errPassTooShort;
> +
> +my $dbh = C4::Context->dbh;
> +
> +$template->param( OpacResetPassword => C4::Context->preference("OpacResetPassword") );

This is not needed.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list