[Rt-commit] r12875 - in rt/branches/3.8-TESTING: .
falcone at bestpractical.com
falcone at bestpractical.com
Wed Jun 4 13:25:12 EDT 2008
Author: falcone
Date: Wed Jun 4 13:25:12 2008
New Revision: 12875
Modified:
rt/branches/3.8-TESTING/ (props changed)
rt/branches/3.8-TESTING/lib/RT/User_Overlay.pm
Log:
r33756 at ketch: falcone | 2008-06-04 13:24:16 -0400
* in the case that a user changes their email address or
an admin tries to change a user's email address, tell
them that the address is in use, rather than claiming
that it is illegal
Modified: rt/branches/3.8-TESTING/lib/RT/User_Overlay.pm
==============================================================================
--- rt/branches/3.8-TESTING/lib/RT/User_Overlay.pm (original)
+++ rt/branches/3.8-TESTING/lib/RT/User_Overlay.pm Wed Jun 4 13:25:12 2008
@@ -543,6 +543,25 @@
}
}
+=head2 SetEmailAddress
+
+Check to make sure someone else isn't using this email address already
+so that a better email address can be returned
+
+=cut
+
+sub SetEmailAddress {
+ my $self = shift;
+ my $Value = shift;
+
+ if ( $self->ValidateEmailAddress( $Value ) ) {
+ return $self->_Set( Field => 'EmailAddress', Value => $Value );
+ } else {
+ return ( 0, $self->loc('Email address in use') )
+ }
+
+}
+
=head2 CanonicalizeEmailAddress ADDRESS
CanonicalizeEmailAddress converts email addresses into canonical form.
More information about the Rt-commit
mailing list