gunnar: server/perl-kolab/perl-kolab/lib/Kolab LDAP.pm,1.3,1.4
cvs at kolab.org
cvs at kolab.org
Sun Jun 27 08:17:20 CEST 2010
Author: gunnar
Update of /kolabrepository/server/perl-kolab/perl-kolab/lib/Kolab
In directory doto:/tmp/cvs-serv30684/perl-kolab/lib/Kolab
Modified Files:
LDAP.pm
Log Message:
Support a hooks directory that allows to extend the deletion of users.
kolab/issue3472 (web client user prefs not deleted when user gets deleted)
kolab/issue3470 (Free/Busy cache not deleted when user gets deleted)
Index: LDAP.pm
===================================================================
RCS file: /kolabrepository/server/perl-kolab/perl-kolab/lib/Kolab/LDAP.pm,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- LDAP.pm 30 Mar 2010 09:26:10 -0000 1.3
+++ LDAP.pm 27 Jun 2010 06:17:18 -0000 1.4
@@ -719,6 +719,20 @@
}
}
+ my $hooksdir = $Kolab::config{'kolab_hooksdir'} . '/delete';
+ opendir(DIR, $hooksdir) or Kolab::log('T', 'Given hook directory $hooksdir does not exist!', KOLAB_ERROR );
+ my @hooks = grep { /^hook-/ } readdir (DIR);
+ closedir(DIR);
+
+ foreach my $hook (@hooks) {
+ system($hook . ' $uid');
+ if ($?==0) {
+ Kolab::log('L', "Successfully ran hook $hook for user $uid.", KOLAB_DEBUG);
+ } else {
+ Kolab::log('L', "Failed running hook $hook for user $uid.", KOLAB_ERROR);
+ }
+ }
+
# FIXME
# This is a horrible fix for kolab/issue3472. kolabd is a simple
# deamon that should react to changes within LDAP. It should NOT
More information about the commits
mailing list