[rt-users] Error: "User <username>: Email address in use"
Ritesh Sood
baralachala at gmail.com
Mon Mar 9 22:56:39 EDT 2009
Hi all,
I've been adding an managing users through RTs web interface without
problem. These users have all had email ID's
of the form <username>.dept.univ.edu
Recently, we've had to give RT access to personnel from central campus
who have email ID's of the form <username>.univ.edu. However, trying
to add these users returns the following error:
User <username>: Email address in use
I am running version 3.8.1 with mySQL DB backend. The following
appears in my RT_SiteConfig.pm
------------------- start code
----------------------------------------------------------
Set($WebBaseURL , "https://rt3.dept.univ.edu");
Set($rtname , "dept.univ.edu");
Set($Organization , "dept.univ.edu");
------------------- end code
----------------------------------------------------------
1) In the file $RT3_INSTALL/lib/RT/User_Overlay.pm
------------------- start code
----------------------------------------------------------
#SANITY CHECK THE NAME AND ABORT IF IT'S TAKEN
if ($RT::SystemUser) { #This only works if RT::SystemUser has
been defined
my $TempUser = RT::User->new($RT::SystemUser);
$TempUser->Load( $args{'Name'} );
return ( 0, $self->loc('Name in use') ) if ( $TempUser->Id );
return ( 0, $self->loc('Email address in use') )
unless ( $self-
>ValidateEmailAddress( $args{'EmailAddress'} ) );
}
else {
$RT::Logger->warning( "$self couldn't check for pre-
existing users");
}
------------------- end code
----------------------------------------------------------
and
------------------- start code
--------------------------------------------------------
=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') )
}
}
------------------- end code
----------------------------------------------------------
Help much appreciated,
Ritesh Sood.
More information about the rt-users
mailing list