View | Details | Raw Unified | Return to bug 8753
Collapse All | Expand All

(-)a/C4/Members.pm (-5 / +3 lines)
Lines 2267-2273 $query is the CGI object, required to determine if http or https must be used Link Here
2267
sub SendPasswordRecoveryEmail {
2267
sub SendPasswordRecoveryEmail {
2268
    my $borrowernumber = shift;
2268
    my $borrowernumber = shift;
2269
    my $email = shift;
2269
    my $email = shift;
2270
    my $query = shift;
2271
    my $dbh = C4::Context->dbh;
2270
    my $dbh = C4::Context->dbh;
2272
    my $username = GetMemberDetails($borrowernumber)->{userid};
2271
    my $username = GetMemberDetails($borrowernumber)->{userid};
2273
2272
Lines 2285-2297 sub SendPasswordRecoveryEmail { Link Here
2285
    #define to/from emails
2284
    #define to/from emails
2286
    my $kohaEmail = C4::Context->preference( 'KohaAdminEmailAddress' );
2285
    my $kohaEmail = C4::Context->preference( 'KohaAdminEmailAddress' );
2287
2286
2287
    my $query = new CGI;
2288
    #create link
2288
    #create link
2289
    my $https = $query->https() ? "https://" : "http://";
2289
    my $protocol = $query->https() ? "https://" : "http://";
2290
    my $uuidLink = $https . C4::Context->preference( 'OPACBaseURL' ) . "/cgi-bin/koha/opac-password-recovery.pl?uniqueKey=$uuid_str";
2290
    my $uuidLink = $protocol . C4::Context->preference( 'OPACBaseURL' ) . "/cgi-bin/koha/opac-password-recovery.pl?uniqueKey=$uuid_str";
2291
    #warn $uuidLink;
2292
2291
2293
    #build email content
2292
    #build email content
2294
    my $query = new CGI;
2295
    my ( $template2, $borrower_number, $cookie ) = C4::Auth::get_template_and_user(
2293
    my ( $template2, $borrower_number, $cookie ) = C4::Auth::get_template_and_user(
2296
    {
2294
    {
2297
        template_name   => "opac-send-password-recovery.tmpl",
2295
        template_name   => "opac-send-password-recovery.tmpl",
(-)a/opac/opac-password-recovery.pl (-2 / +1 lines)
Lines 102-108 if ( $query->param('sendEmail') || $query->param('resendEmail') ) { Link Here
102
    }
102
    }
103
    else {
103
    else {
104
        #generate uuid and send recovery email
104
        #generate uuid and send recovery email
105
        if ( SendPasswordRecoveryEmail( $borrower_number, $email, $query ) ) {
105
        if ( SendPasswordRecoveryEmail( $borrower_number, $email ) ) {
106
            # if it works....
106
            # if it works....
107
            $template->param(
107
            $template->param(
108
                mail_sent => 1,
108
                mail_sent => 1,
109
- 

Return to bug 8753