diff options
author | Guilhem Moulin <guilhem.moulin@fripost.org> | 2012-05-04 09:02:59 +0200 |
---|---|---|
committer | Guilhem Moulin <guilhem.moulin@fripost.org> | 2012-05-04 09:02:59 +0200 |
commit | 06008e59a1dfbda99eace3d5e66d194b7e8e5c38 (patch) | |
tree | 5e8aa1dde4792b8523b4bef4005aef89afd69802 /lib | |
parent | 8bbf67de5056e1a0ee59dc1ff104223ec32df2f2 (diff) |
Adding a flag --force
Diffstat (limited to 'lib')
-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 ) |