[Bps-public-commit] cpan2rt branch master updated. 40fd5851818b7d1bbec8e6563336015795e1586d

BPS Git Server git at git.bestpractical.com
Fri Jan 28 16:25:20 UTC 2022


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "cpan2rt".

The branch, master has been updated
       via  40fd5851818b7d1bbec8e6563336015795e1586d (commit)
      from  0503b91d9cf3227474004a86a712a7850d9e0f89 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 40fd5851818b7d1bbec8e6563336015795e1586d
Author: Brian Conry <bconry at bestpractical.com>
Date:   Fri Jan 28 10:21:03 2022 -0600

    Remove blocked email address from more users
    
    The previous change missed the case where the 00whois.xml email address
    isn't blocked but the RT user for the PAUSE id has a different email
    addddress that is blocked.
    
    This was due to not taking into account the fact that cpan2rt was
    designed originally to only set email addresses when they weren't
    already set so that if a user had modified their email address in RT to
    be different from what's listed in PAUSE that would be preserved.

diff --git a/lib/CPAN2RT.pm b/lib/CPAN2RT.pm
index 8c93ab5..200eac3 100644
--- a/lib/CPAN2RT.pm
+++ b/lib/CPAN2RT.pm
@@ -825,11 +825,13 @@ sub load_or_create_user {
         if( exists $bounce_map->{ $email } ) {
             $byemail->SetEmailAddress( '' ) if $byemail->id;
         }
-        else {
-            $bycpanid->SetEmailAddress( $email )
-                unless $bycpanid->EmailAddress;
+        elsif( exists $bounce_map->{ $bycpanid->EmailAddress } ) {
+            $bycpanid->SetEmailAddress( '' ) if $byemail->id;
         }
 
+        $bycpanid->SetEmailAddress( $email )
+            unless $bycpanid->EmailAddress;
+
         $bycpanid->SetRealName( $realname )
             unless $bycpanid->RealName;
 

-----------------------------------------------------------------------

Summary of changes:
 lib/CPAN2RT.pm | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
cpan2rt


More information about the Bps-public-commit mailing list