Browse Source

* LDV::LDAP : tweaks

master
Alex 'AdUser' Z 10 years ago
parent
commit
5bffb4177c
  1. 4
      lib/LDV/LDAP.pm

4
lib/LDV/LDAP.pm

@ -101,7 +101,6 @@ sub get {
utf8::decode($data->{$attr}); utf8::decode($data->{$attr});
} }
delete $data->{userPassword};
delete $data->{objectClass}; delete $data->{objectClass};
return $data; return $data;
} }
@ -123,7 +122,8 @@ sub update {
my @chg = (); my @chg = ();
while (my ($key, $value) = each(%$attrs)) { while (my ($key, $value) = each(%$attrs)) {
next unless exists $allowed{$key}; next unless exists $allowed{$key};
next if ($key eq 'uid'); # rename protection next if ($key =~ m/uid/); # rename protection
next if ($key =~ m/objectClass/); # class protection
if ($value and not exists $data->{$key}) { if ($value and not exists $data->{$key}) {
push @chg, add => [$key => $value]; push @chg, add => [$key => $value];
next; next;

Loading…
Cancel
Save