[prev in list] [next in list] [prev in thread] [next in thread]
List: perl-ldap-dev
Subject: Re: AD password change with Net::LDAP
From: Christopher A Bongaarts <cab () tc ! umn ! edu>
Date: 2001-07-03 20:43:45
[Download RAW message or body]
As Graham Barr once put it so eloquently:
> $ldap->modify($DN,
> changes => [
> delete => [$attr => []],
> add => [ $attr => $value ]
> ]
> );
[...]
Actually, this inspired me to a more "correct" solution for my problem
below: instead of doing $entry->update, do something like
my @changes = $entry->changes();
&munge_changes(\@changes);
$ldap->modify($entry, changes => \@changes);
> > > > What I really want to do is "change the changes", not add a
> > > new change
> > > > to the list of changes. My temporary workaround will likely be to
> > > > muck with the "changes" array directly. But I'm open to better
> > > > solutions. I see there is an (undocumented?) "changes" method that
> > > > returns the contents of the changes array. Perhaps if it returned a
> > > > reference to the array I could muck with it without depending on the
> > > > internal representation of the Entry object.
%% Christopher A. Bongaarts %% cab@tc.umn.edu %%
%% Internet Services %% http://umn.edu/~cab %%
%% University of Minnesota %% +1 (612) 625-1809 %%
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic