[Bps-public-commit] RT-Extension-MergeUsers branch, master, updated. 0.06-1-gcffe9a6

? sunnavy sunnavy at bestpractical.com
Thu Aug 30 12:14:31 EDT 2012


The branch, master has been updated
       via  cffe9a69351f0da400b0cc899e074e0119a9fc1c (commit)
      from  b6247f8f9cb559ae4e933ca914c354c6f1293c08 (commit)

Summary of changes:
 lib/RT/Extension/MergeUsers.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

- Log -----------------------------------------------------------------
commit cffe9a69351f0da400b0cc899e074e0119a9fc1c
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Fri Aug 31 00:03:36 2012 +0800

    it's wrong to assume ValidateEmailAddress returns a single value
    
    it could make email validation always pass, see also #70641 on rt.cpan
    
    use list context instead to get the right return value.

diff --git a/lib/RT/Extension/MergeUsers.pm b/lib/RT/Extension/MergeUsers.pm
index 6a3d31f..f84c3a5 100644
--- a/lib/RT/Extension/MergeUsers.pm
+++ b/lib/RT/Extension/MergeUsers.pm
@@ -289,8 +289,8 @@ sub SetEmailAddress {
     my $self = shift;
     my $value = shift;
 
-    return ( 0, $self->loc('Email address in use') )
-        unless $self->ValidateEmailAddress( $value );
+    my ( $val, $msg ) = $self->ValidateEmailAddress($value);
+    return ( 0, $msg || $self->loc('Email address in use') ) unless $val;
 
     # if value is valid then either there is no user or
     # user is merged into this one

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



More information about the Bps-public-commit mailing list