Permalink
Browse files

Keep some sort of record even if users don't have an email

Should help keep EmailRecord transactions happy
  • Loading branch information...
1 parent f1e420c commit 9ce4b3e5aa7d11df395ba3e7072a422b545fe200 @afresh1 committed Jul 27, 2012
Showing with 2 additions and 6 deletions.
  1. +2 −6 rt-ticket-dumper
View
@@ -18,9 +18,7 @@ sub convertUser {
return $users{$userid} if ( $users{$userid} );
my $user = RT::User->new($RT::SystemUser);
$user->Load($userid);
- my $email = $user->EmailAddress();
- $users{$userid} = $email;
- return $email;
+ return $users{$userid} = $user->EmailAddress() || $user->id;
}
sub convertQueue {
@@ -36,9 +34,7 @@ sub convertEmail {
return $users{$emailid} if ( $users{$emailid} );
my $user = RT::User->new($RT::SystemUser);
$user->LoadByEmail($emailid);
- my $email = $user->EmailAddress();
- $users{$emailid} = $email;
- return $email || $emailid;
+ return $users{$emailid} = $user->EmailAddress() || $user->id || $emailid;
}
RT::LoadConfig();

0 comments on commit 9ce4b3e

Please sign in to comment.