| 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", |