From: hickert Date: Tue, 5 Sep 2006 07:02:06 +0000 (+0000) Subject: Fixed some environment user problems. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=1f41200de64f8a6ce2c6a5f6267b10c991831116;p=gosa.git Fixed some environment user problems. - toggle admin state wasn't saved correctly. - User names wasn't added as expected git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4590 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/personal/environment/class_environment.inc b/plugins/personal/environment/class_environment.inc index aa7a42562..0245be815 100644 --- a/plugins/personal/environment/class_environment.inc +++ b/plugins/personal/environment/class_environment.inc @@ -808,8 +808,8 @@ class environment extends plugin }else{ if(isset($this->NewAddedPrinters[$pname])){ $type = "User"; - }elseif($printerObj->by_object['printgeneric']->DelMember("AddUser",$this->cn)){ - $type = "User"; + }elseif($printerObj->by_object['printgeneric']->DelMember("AddUser",$this->uid)){ + $type = "User"; } } if($type){ @@ -825,10 +825,8 @@ class environment extends plugin } if((isset($_POST['gotoPrinterEdit']))&&(isset($_POST['gotoPrinterSel']))&&(!empty($_POST['gotoPrinterSel']))){ - - $printers = $_POST['gotoPrinterSel']; - + $this->add_del_printer_member_was_called = true; foreach($printers as $printer){ if($this->gotoPrinter[$printer]['mode']=="user"){ $this->gotoPrinter[$printer]['mode']="admin"; @@ -1059,21 +1057,21 @@ class environment extends plugin } /* Remove old entries */ - $ldap->search("(&(objectClass=gotoPrinter)(goto".$s_suffix."Printer=".$this->uid."))",array("*")); + $ldap->search("(&(objectClass=gotoPrinter)(goto".$s_suffix."Printer=".$this->$useVar."))",array("*")); while($attr = $ldap->fetch()){ $printerObj = NULL; $printerObj = new printtabs($this->config,$this->config->data['TABS']['PRINTTABS'],$attr['dn'],"printer"); $printerObj->set_acl_base($attr['dn']); - $printerObj->by_object['printgeneric']->DelMember($types["goto".$s_suffix."Printer"],$this->uid); + $printerObj->by_object['printgeneric']->DelMember($types["goto".$s_suffix."Printer"],$this->$useVar); $printerObj->by_object['printgeneric']->save(); } - $ldap->search("(&(objectClass=gotoPrinter)(goto".$s_suffix."AdminPrinter=".$this->uid."))",array("*")); + $ldap->search("(&(objectClass=gotoPrinter)(goto".$s_suffix."AdminPrinter=".$this->$useVar."))",array("*")); while($attr = $ldap->fetch()){ $printerObj = NULL; $printerObj = new printtabs($this->config,$this->config->data['TABS']['PRINTTABS'],$attr['dn'],"printer"); $printerObj->set_acl_base($attr['dn']); - $printerObj->by_object['printgeneric']->DelMember($types["goto".$s_suffix."AdminPrinter"],$this->uid); + $printerObj->by_object['printgeneric']->DelMember($types["goto".$s_suffix."AdminPrinter"],$this->$useVar); $printerObj->by_object['printgeneric']->save(); }