From 21ac651a4d40472515f5f7d0dd0cd7d27682ee50 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Sat, 28 Apr 2012 17:51:04 +0200 Subject: wibble --- lib/Fripost/Schema/Type/User.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/Fripost/Schema/Type/User.pm b/lib/Fripost/Schema/Type/User.pm index f5b6ce2..c3075a8 100644 --- a/lib/Fripost/Schema/Type/User.pm +++ b/lib/Fripost/Schema/Type/User.pm @@ -20,7 +20,9 @@ sub search { my $self = shift; my $user = shift; - my ($username, $domain) = split /\@/, $user->{username}, 2; + my ($username, $domain); + ($username, $domain) = split /\@/, $user->{username}, 2 + if defined $user->{username}; my $base = $self->{_options}->{base_dn}; $base = join ',', ( 'dc='.$domain, $base ) -- cgit v1.2.3