diff options
Diffstat (limited to 'lib/Fripost')
-rw-r--r-- | lib/Fripost/Schema/Type/User.pm | 4 |
1 files changed, 3 insertions, 1 deletions
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 ) |