| 
      
            Lines 104-109
          sub SendPasswordRecoveryEmail {
      
      
        Link Here
      
     | 
  
        
          | 104 | 
              my $borrower  = shift;    # Koha::Patron  | 
          104 | 
              my $borrower  = shift;    # Koha::Patron  | 
        
        
          | 105 | 
              my $userEmail = shift;    #to_address (the one specified in the request)  | 
          105 | 
              my $userEmail = shift;    #to_address (the one specified in the request)  | 
        
        
          | 106 | 
              my $update    = shift;  | 
          106 | 
              my $update    = shift;  | 
        
            
               | 
               | 
              107 | 
                  my $staff     = shift // 0;  | 
            
        
          | 107 | 
           | 
          108 | 
           | 
        
        
          | 108 | 
              my $schema = Koha::Database->new->schema;  | 
          109 | 
              my $schema = Koha::Database->new->schema;  | 
        
        
          | 109 | 
           | 
          110 | 
           | 
        
  
    | 
      
            Lines 114-121
          sub SendPasswordRecoveryEmail {
      
      
        Link Here
      
     | 
  
        
          | 114 | 
              } while ( substr ( $uuid_str, -1, 1 ) eq '.' );  | 
          115 | 
              } while ( substr ( $uuid_str, -1, 1 ) eq '.' );  | 
        
        
          | 115 | 
           | 
          116 | 
           | 
        
        
          | 116 | 
              # insert into database  | 
          117 | 
              # insert into database  | 
        
            
               | 
               | 
              118 | 
                  my $days = $staff ? 5 : 2;  | 
            
        
          | 117 | 
              my $expirydate =  | 
          119 | 
              my $expirydate =  | 
        
          
            
              | 118 | 
                    dt_from_string()->add( days => 2 );  | 
              120 | 
                    dt_from_string()->add( days => $days );  | 
            
        
          | 119 | 
              if ($update) { | 
          121 | 
              if ($update) { | 
        
        
          | 120 | 
                  my $rs =  | 
          122 | 
                  my $rs =  | 
        
        
          | 121 | 
                    $schema->resultset('BorrowerPasswordRecovery') | 
          123 | 
                    $schema->resultset('BorrowerPasswordRecovery') | 
        
  
    | 
      
            Lines 141-147
          sub SendPasswordRecoveryEmail {
      
      
        Link Here
      
     | 
  
        
          | 141 | 
              # prepare the email  | 
          143 | 
              # prepare the email  | 
        
        
          | 142 | 
              my $letter = C4::Letters::GetPreparedLetter(  | 
          144 | 
              my $letter = C4::Letters::GetPreparedLetter(  | 
        
        
          | 143 | 
                  module      => 'members',  | 
          145 | 
                  module      => 'members',  | 
        
          
            
              | 144 | 
                      letter_code => 'PASSWORD_RESET',  | 
              146 | 
                      letter_code => $staff ? 'STAFF_PASSWORD_RESET' : 'PASSWORD_RESET',  | 
            
        
          | 145 | 
                  branchcode  => $borrower->branchcode,  | 
          147 | 
                  branchcode  => $borrower->branchcode,  | 
        
        
          | 146 | 
                  lang        => $borrower->lang,  | 
          148 | 
                  lang        => $borrower->lang,  | 
        
        
          | 147 | 
                  substitute =>  | 
          149 | 
                  substitute =>  |