my $print = defined ($FieldNames{$field}) ? $FieldNames{$field} : $field;
my @values = @{$contacts->{$field}};
+ next if (!$UserID and $field eq 'group');
+
push (@values, '');
for (@values)
{
my $field = $_;
+ next if (!$UserID and $field eq 'group');
+
if (defined ($contacts->{$field}))
{
my $values = $contacts->{$field};
use LiCoM::Config (qw(get_config));
use LiCoM::Person;
-our $Config = get_config ();
+our $Config;
-die unless (defined ($Config->{'uri'}) and defined ($Config->{'bind_dn'})
- and defined ($Config->{'password'}));
+if (-e $ENV{'HOME'} . '/.licomrc')
+{
+ $Config = get_config ($ENV{'HOME'} . '/.licomrc');
+}
+elsif (-e '/etc/licom/licom.conf')
+{
+ $Config = get_config ('/etc/licom/licom.conf');
+}
+else
+{
+ $Config = get_config ();
+}
+
+unless (defined ($Config->{'uri'}) and defined ($Config->{'bind_dn'})
+ and defined ($Config->{'password'}))
+{
+ die (<<ERROR);
+The configuration has not been found or is not complete. At least the options
+uri, bind_dn and password are needed.
+ERROR
+}
$Config->{'base_dn'} = $Config->{'bind_dn'} unless (defined ($Config->{'base_dn'}));