Problems with numerical username (External authentication)

Hi,

I am using RT (4.4.1) with external authentication (Active Directory)
the problem is that our AD uses a numerical value as username,
so, when RT try to Load the user information it found a numerical value and
execute “LoadById”.

My dirty solution, at the moment, is to change the regular expression in this way:
(our usernames are 7 numerical digit)

— lib/RT/User.pm 2016-07-18 22:20:17.000000000 +0200
+++ lib/RT/UserNew.pm 2016-11-08 13:43:25.457625208 +0100
@@ -464,7 +464,7 @@
my $self = shift;
my $identifier = shift || return undef;

  • if ( $identifier !~ /\D/ ) {
  • if ( $identifier !~ /\D|\d{7}/ ) {
    return $self->SUPER::LoadById( $identifier );
    } elsif ( UNIVERSAL::isa( $identifier, ‘RT::User’ ) ) {
    return $self->SUPER::LoadById( $identifier->Id );

how to solve the problem ?

best regards
Marco Milita

Questo messaggio e i suoi allegati sono indirizzati esclusivamente alle persone indicate. Non è consentita la diffusione, copia o qualsiasi altra azione derivante dalla conoscenza delle informazioni in esso contenute, salve le esigenze operative strettamente connesse all’attività lavorativa svolta. Qualora abbiate ricevuto questo messaggio per errore, siete invitati a darne immediata comunicazione al mittente e a provvedere alla sua cancellazione. Le risposte fornite dal destinatario del presente messaggio potranno essere conosciute nell’ambito dell’organizzazione di appartenenza del mittente e comunque utilizzate esclusivamente per le attività lavorative di competenza, nel rispetto delle vigenti norme di legge

This message and its attachments are addressed exclusively to the recipient(s) named above. The diffusion, copying or any other action resulting from the knowledge of the information contained in it, is not permitted, except of the operations strictly connected to the authorized job activities. If you have received this message in error, you are invited to immediately notify the sender and delete all copies in your possession. The answers provided by the recipient of this message might be known within the organization of the sender’s and however used exclusively for authorized job activities, in accordance by applicable law.