| Lines 41-46
          use Koha::Patron::Debarments qw(IsDebarred);
      
      
        Link Here | 
        
          | 41 | use Text::Unaccent qw( unac_string ); | 41 | use Text::Unaccent qw( unac_string ); | 
        
          | 42 | use Koha::AuthUtils qw(hash_password); | 42 | use Koha::AuthUtils qw(hash_password); | 
        
          | 43 | use Koha::Database; | 43 | use Koha::Database; | 
            
              |  |  | 44 | use Koha::Holds; | 
        
          | 44 | use Koha::List::Patron; | 45 | use Koha::List::Patron; | 
        
          | 45 |  | 46 |  | 
        
          | 46 | our (@ISA,@EXPORT,@EXPORT_OK,$debug); | 47 | our (@ISA,@EXPORT,@EXPORT_OK,$debug); | 
  
    | Lines 1660-1677
          sub DelMember {
      
      
        Link Here | 
        
          | 1660 |     my $borrowernumber = shift; | 1661 |     my $borrowernumber = shift; | 
        
          | 1661 |     #warn "in delmember with $borrowernumber"; | 1662 |     #warn "in delmember with $borrowernumber"; | 
        
          | 1662 |     return unless $borrowernumber;    # borrowernumber is mandatory. | 1663 |     return unless $borrowernumber;    # borrowernumber is mandatory. | 
            
              |  |  | 1664 |     # Delete Patron's holds | 
            
              | 1665 |     my @holds = Koha::Holds->search({ borrowernumber => $borrowernumber }); | 
            
              | 1666 |     map { $_->delete } @holds; | 
        
          | 1663 |  | 1667 |  | 
          
            
              | 1664 |     my $query = qq|DELETE  | 1668 |     my $query = " | 
            
              | 1665 |           FROM  reserves  |  |  | 
            
              | 1666 |           WHERE borrowernumber=?|; | 
            
              | 1667 |     my $sth = $dbh->prepare($query); | 
            
              | 1668 |     $sth->execute($borrowernumber); | 
            
              | 1669 |     $query = " | 
        
          | 1670 |        DELETE | 1669 |        DELETE | 
        
          | 1671 |        FROM borrowers | 1670 |        FROM borrowers | 
        
          | 1672 |        WHERE borrowernumber = ? | 1671 |        WHERE borrowernumber = ? | 
        
          | 1673 |    "; | 1672 |    "; | 
          
            
              | 1674 |     $sth = $dbh->prepare($query); | 1673 |     my $sth = $dbh->prepare($query); | 
        
          | 1675 |     $sth->execute($borrowernumber); | 1674 |     $sth->execute($borrowernumber); | 
        
          | 1676 |     logaction("MEMBERS", "DELETE", $borrowernumber, "") if C4::Context->preference("BorrowersLog"); | 1675 |     logaction("MEMBERS", "DELETE", $borrowernumber, "") if C4::Context->preference("BorrowersLog"); | 
        
          | 1677 |     return $sth->rows; | 1676 |     return $sth->rows; | 
            
              | 1678 | -  |  |  |