diff options
Diffstat (limited to 'lib/Fripost')
-rw-r--r-- | lib/Fripost/Schema/Type/Alias.pm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Fripost/Schema/Type/Alias.pm b/lib/Fripost/Schema/Type/Alias.pm index 8c0b25e..dee2fbc 100644 --- a/lib/Fripost/Schema/Type/Alias.pm +++ b/lib/Fripost/Schema/Type/Alias.pm @@ -21,7 +21,10 @@ sub search { my ($username, $domain); ($username, $domain) = split /\@/, $alias->{address}, 2 if defined $alias->{address}; - $domain = $username if (defined $username) and not (defined $domain); + if ((defined $username) and not (defined $domain)) { + $domain = $username; + undef $username; + } my $base = $self->{_options}->{base_dn}; $base = join ',', ( 'dc='.$domain, $base ) |