aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem.moulin@fripost.org>2012-05-04 09:02:59 +0200
committerGuilhem Moulin <guilhem.moulin@fripost.org>2012-05-04 09:02:59 +0200
commit06008e59a1dfbda99eace3d5e66d194b7e8e5c38 (patch)
tree5e8aa1dde4792b8523b4bef4005aef89afd69802 /lib
parent8bbf67de5056e1a0ee59dc1ff104223ec32df2f2 (diff)
Adding a flag --force
Diffstat (limited to 'lib')
-rw-r--r--lib/Fripost/Schema/Type/Alias.pm5
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 )