From 06008e59a1dfbda99eace3d5e66d194b7e8e5c38 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Fri, 4 May 2012 09:02:59 +0200 Subject: Adding a flag --force --- lib/Fripost/Schema/Type/Alias.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib') 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 ) -- cgit v1.2.3