summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 11c7b3c)
raw | patch | inline | side by side (parent: 11c7b3c)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 11 May 2007 13:38:10 +0000 (13:38 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 11 May 2007 13:38:10 +0000 (13:38 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6363 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/plugins/personal/environment/class_environment.inc b/plugins/personal/environment/class_environment.inc
index f69065f399e3fbd9b06b6b8e4004a3e1bc1e2150..0f3d93059edbc5011c79b74757ac1017b77190bb 100644 (file)
{
plugin::plugin ($config, $dn);
+ if($this->is_account){
+ @log::log("view","users/environment",$this->dn);
+ }
+
+
/* Setting uid to default */
if(isset($this->attrs['uid'][0])){
$this->uid = $this->attrs['uid'][0];
$this->cleanup();
$ldap->modify ($this->attrs);
+ @log::log("remove","users/environment",$this->dn,array_keys($this->attrs),$ldap->get_error());
show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/environment account with dn '%s' failed."),$this->dn));
/* Optionally execute a command after we're done */
$ldap->cd($this->dn);
$this->cleanup();
$ldap->$mode($this->attrs);
+
+ if($mode == "modify"){
+ @log::log("modify","users/environment",$this->dn,array_keys($this->attrs),$ldap->get_error());
+ }else{
+ @log::log("create","users/environment",$this->dn,array_keys($this->attrs),$ldap->get_error());
+ }
+
show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/environment account with dn '%s' failed."),$this->dn));
$this->handle_post_events($mode,array("uid"=>$this->uid));
}
index 924b7cf8bbc3f264b64cb4ca8bf34ce3354557d6..71e11b99f5316cc869345ee577cebd776844686a 100644 (file)
$this->attributes=array_merge($this->attributes,$this->govattrs);
}
- @log::log("view","users/user",$dn);
-
/* Load base attributes */
plugin::plugin ($config, $dn);
/* Create me for new accounts */
if ($dn == "new"){
$this->is_account= TRUE;
+ }else{
+ @log::log("view","users/user",$dn);
}
/* Make hash default to md5 if not set in config */
$ldap= $this->config->get_ldap_link();
$ldap->rmdir ($this->dn);
show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/generic account with dn '%s' failed."),$this->dn));
-
+
+ @log::log("remove","users/user",$dn,$this->attributes,$ldap->get_error());
+
/* Delete references to groups */
$ldap->cd ($this->config->current['BASE']);
$ldap->search ("(&(objectClass=posixGroup)(memberUid=".$this->uid."))", array("uid"));
$ldap->cd ($this->dn);
$ldap->$mode ($this->attrs);
if (show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/generic account with dn '%s' failed."),$this->dn))){
- @log::log("modify","users/user",$this->dn,array_keys($this->attrs),$ldap->get_error());
return (1);
}
- @log::log("modify","users/user",$this->dn,array_keys($this->attrs),$ldap->get_error());
+
+ if($mode == "modify"){
+ @log::log("modify","users/user",$this->dn,array_keys($this->attrs),$ldap->get_error());
+ }else{
+ @log::log("create","users/user",$this->dn,array_keys($this->attrs),$ldap->get_error());
+ }
/* Remove cert?
For some reason, the 'ldap' class doesn't want to remove binary entries, so I need
diff --git a/plugins/personal/posix/class_posixAccount.inc b/plugins/personal/posix/class_posixAccount.inc
index 6668f1cbbcd8c04801f0351674095f54b5ecdb5c..4dece52c5e6bcec4366630c972fb3a61207c855c 100644 (file)
$ldap= $this->config->get_ldap_link();
+ if($this->is_account){
+ @log::log("view","users/posix",$this->dn);
+ }
+
if ($dn != NULL){
/* Correct is_account. shadowAccount is not required. */
$this->cleanup();
$ldap->modify ($this->attrs);
+ @log::log("remove","users/posix",$this->dn,array_keys($this->attrs),$ldap->get_error());
+
show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/posix account with dn '%s' failed."),$this->dn));
/* Delete group only if cn is uid and there are no other
unset($this->attrs['uid']);
$ldap->modify ($this->attrs);
+ @log::log("modify","users/posix",$this->dn,array_keys($this->attrs),$ldap->get_error());
+
show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/posix account with dn '%s' failed."),$this->dn));
/* Remove lock needed for unique id generation */