Code

Some changes
[gosa.git] / plugins / admin / groups / class_groupManagement.inc
1 <?php
2 /*
3    This code is part of GOsa (https://gosa.gonicus.de)
4    Copyright (C) 2003  Cajus Pollmeier
6    This program is free software; you can redistribute it and/or modify
7    it under the terms of the GNU General Public License as published by
8    the Free Software Foundation; either version 2 of the License, or
9    (at your option) any later version.
11    This program is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14    GNU General Public License for more details.
16    You should have received a copy of the GNU General Public License
17    along with this program; if not, write to the Free Software
18    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  */
20 require "tabs_group.inc";
22 class groupManagement extends plugin
23 {
24   /* Definitions */
25   var $plHeadline= "Groups";
26   var $plDescription= "This does something";
27   var $departments = array();
29   /* Dialog attributes */
30   var $grouptab= NULL;
31   var $grouplist= array();
32   var $ui= NULL;
33   var $acl= "";
35   function groupManagement ($config, $ui)
36   {
37     /* Save configuration for internal use */
38     $this->config= $config;
39     $this->ui= $ui;
41     /* Get global filter config */
42     if (!is_global("groupfilter")){
43       $base= get_base_from_people($ui->dn);
44       $groupfilter= array("primarygroups" => "checked",
45           "mailgroups" => "checked",
46           "sambagroups" => "checked",
47           "appgroups" => "checked",
48           "functionalgroups" => "checked",
49           "guser" => "*",
50           "subsearch" => "",
51           "depselect" => $base,
52           "regex" => "*");
53       register_global("groupfilter", $groupfilter);
54     }
55   }
57   function execute()
58   {
59         /* Call parent execute */
60 //      plugin::execute();
62     /* Save data */
63     $groupfilter= get_global("groupfilter");
64     $s_action   = "";
65     $s_entry    = "";
68     if (!isset($this->grouptab)){
69       foreach( array("depselect", "guser", "regex") as $type){
70         if (isset($_POST[$type])){
71           $groupfilter[$type]= $_POST[$type];
72         } 
73       }
74       if (isset($_POST['regex'])){
75         foreach( array("primarygroups", "sambagroups", "mailgroups", "appgroups",
76               "functionalgroups", "subsearch") as $type){
78           if (isset($_POST[$type])) {
79             $groupfilter[$type]= "checked";
80           } else {
81             $groupfilter[$type]= "";
82           }
83         }
84       }
85       if (isset($_GET['search'])){
86         $s= mb_substr($_GET['search'], 0, 1, "UTF8")."*";
87         if ($s == "**"){
88           $s= "*";
89         }
90         $groupfilter['regex']= $s;
91       }
92       register_global("groupfilter", $groupfilter);
93     }
96     /* Test Posts */
97     foreach($_POST as $key => $val){
98       // Post for delete
99       if(preg_match("/group_del.*/",$key)){
100         $s_action = "del";
101         $s_entry  = preg_replace("/group_".$s_action."_/i","",$key);
102         // Post for edit
103       }elseif(preg_match("/group_edit_.*/",$key)){
104         $s_action="edit";
105         $s_entry  = preg_replace("/group_".$s_action."_/i","",$key);
106         // Post for new
107       }elseif(preg_match("/dep_back.*/i",$key)){
108         $s_action="back";
109       }elseif(preg_match("/group_new.*/",$key)){
110         $s_action="new";
111       }elseif(preg_match("/dep_home.*/i",$key)){
112         $s_action="home";
113       }elseif(preg_match("/group_tplnew.*/i",$key)){
114         $s_action="new_tpl";
115       }elseif(preg_match("/group_chgpw.*/i",$key)){
116         $s_action="change_pw";
117         $s_entry  = preg_replace("/group_chgpw_/i","",$key);
118       }elseif(preg_match("/dep_root.*/i",$key)){
119         $s_action="root";
120       }
121     }
122     $s_entry  = preg_replace("/_.$/","",$s_entry); 
124     /* Start for New List Managment */
125     if(isset($_GET['act'])&&($_GET['act']=="dep_open")){
126       $s_action="open";
127       $s_entry = base64_decode($_GET['dep_id']);
128       $groupfilter['depselect']= "".$this->config->departments[trim($s_entry)];
129     }
131     // Edit if
132     if((isset($_GET['act']))&&($_GET['act']=="edit_entry")){
133       $s_action ="edit";
134       $s_entry  = $_GET['id'];
135     }
137     /* Department changed? */
138     if(isset($_POST['depselect']) && $_POST['depselect']){
139       $groupfilter['depselect']= $_POST['depselect'];
140     }
142     /* Homebutton is posted */
143     if($s_action=="home"){
144       $groupfilter['depselect']= (preg_replace("/^[^,]+,/","",$this->ui->dn));
145       $groupfilter['depselect']= (preg_replace("/^[^,]+,/","",$groupfilter['depselect']));
146     }
148     if($s_action=="root"){
149       $groupfilter['depselect']=($this->config->current['BASE']);
150     }
152     /* If Backbutton is Posted */
153     if($s_action == "back"){
154       $base_back= preg_replace("/^[^,]+,/","",$groupfilter['depselect']);
155       $base_back= convert_department_dn($base_back);
157       if(isset($this->config->departments[trim($base_back)])){
158         $groupfilter['depselect']= $this->config->departments[trim($base_back)];
159       }else{
160         $groupfilter['depselect']= $this->config->departments["/"];
161       }
162     }
163     register_global("groupfilter", $groupfilter);
165     $smarty= get_smarty();
167     /* Prepare formular */
168     $this->reload();
170     /* Check for exeeded sizelimit */
171     if (($message= check_sizelimit()) != ""){
172       return($message);
173     }
175     /* New group? */
176     if ($s_action=="new"){
178       /* By default we set 'dn' to 'new', all relevant plugins will
179          react on this. */
180       $this->dn= "new";
182       /* Create new usertab object */
183       $this->grouptab= new grouptabs($this->config,
184           $this->config->data['TABS']['GROUPTABS'], $this->dn);
185     }
187     /* Cancel dialogs */
188     if (isset($_POST['edit_cancel']) || isset($_POST['password_cancel'])){
189       del_lock ($this->grouptab->dn);
190       unset ($this->grouptab);
191       $this->grouptab= NULL;
192       unset($_SESSION['objectinfo']);
193     }
195     /* Finish group edit is triggered by the tabulator dialog, so
196        the user wants to save edited data. Check and save at this
197        point. */
198     if (isset($_POST['edit_finish'])){
200       /* Check tabs, will feed message array */
201       $message= $this->grouptab->check();
203       /* Save, or display error message? */
204       if (count($message) == 0){
206         /* Save user data to ldap */
207         $this->grouptab->save();
208         gosa_log ("Group object'".$this->dn."' has been saved");
210         /* Group has been saved successfully, remove lock from
211            LDAP. */
212         if ($this->dn != "new"){
213           del_lock ($this->dn);
214         }
216         /* There's no page reload so we have to read new users at
217            this point. */
218         $this->reload ();
219         unset ($this->grouptab);
220         $this->grouptab= NULL;
221         unset ($_SESSION['objectinfo']);
223       } else {
224         /* Ok. There seem to be errors regarding to the tab data,
225            show message and continue as usual. */
226         show_errors($message);
227       }
228     }
230     /* User wants to edit data? */
231     if ($s_action=="edit"){
233       /* Get 'dn' from posted 'uid', must be unique */
234       $this->dn= $this->grouplist[trim($s_entry)]['dn'];
236       /* Check locking, save current plugin in 'back_plugin', so
237          the dialog knows where to return. */
239       $user = get_lock($this->dn);
241       if ($user != ""){
242         return(gen_locked_message ($user, $this->dn));
243       }
245       /* Lock the current entry, so everyone will get the
246          above dialog */
247       add_lock ($this->dn, $this->ui->dn);
249       /* Set up the users ACL's for this 'dn' */
250       $acl= get_permissions ($this->dn, $this->ui->subtreeACL);
252       /* Register grouptab to trigger edit dialog */
253       $this->grouptab= new grouptabs($this->config,
254           $this->config->data['TABS']['GROUPTABS'], $this->dn);
255       $this->grouptab->set_acl($acl);
256       $_SESSION['objectinfo']= $this->dn;
257     }
259     /* Remove user was requested */
260     if ($s_action=="del"){
261       /* Get 'dn' from posted 'uid' */
262       $this->dn= $this->grouplist[trim($s_entry)]['dn'];
264       /* Load permissions for selected 'dn' and check if
265          we're allowed to remove this 'dn' */
266       $acl= get_permissions ($this->dn, $this->ui->subtreeACL);
267       $this->acl= get_module_permission($acl, "group", $this->dn);
268       if (chkacl($this->acl, "delete") == ""){
270         /* Check locking, save current plugin in 'back_plugin', so
271            the dialog knows where to return. */
272         if (($user= get_lock($this->dn)) != ""){
273           return(gen_locked_message ($user, $this->dn));
274         }
276         /* Lock the current entry, so nobody will edit it during deletion */
277         add_lock ($this->dn, $this->ui->dn);
278         $smarty->assign("info", sprintf(_("You're about to delete the group '%s'."), $this->dn));
279         return($smarty->fetch(get_template_path('remove.tpl', TRUE)));
280       } else {
282         /* Obviously the user isn't allowed to delete. Show message and
283            clean session. */
284         print_red (_("You are not allowed to delete this group!"));
285       }
286     }
288     /* Confirmation for deletion has been passed. Group should be deleted. */
289     if (isset($_POST['delete_group_confirm'])){
291       /* Some nice guy may send this as POST, so we've to check
292          for the permissions again. */
293       if (chkacl($this->acl, "delete") == ""){
295         /* Delete request is permitted, perform LDAP action */
296         $this->grouptab= new grouptabs($this->config,
297             $this->config->data['TABS']['GROUPTABS'], $this->dn);
298         $this->grouptab->set_acl(array($this->acl));
299         $this->grouptab->delete ();
300         gosa_log ("Group object'".$this->dn."' has been removed");
301         unset ($this->grouptab);
302         $this->grouptab= NULL;
304         /* Group list has changed, reload it. */
305         $this->reload ();
306       } else {
308         /* Normally this shouldn't be reached, send some extra
309            logs to notify the administrator */
310         print_red (_("You are not allowed to delete this group!"));
311         gosa_log ("Warning: '".$this->ui->uid."' tried to trick group deletion.");
312       }
314       /* Remove lock file after successfull deletion */
315       del_lock ($this->dn);
316       unset($_SESSION['objectinfo']);
317     }
320     /* Delete group canceled? */
321     if (isset($_POST['delete_cancel'])){
322       del_lock ($this->dn);
323       unset($_SESSION['objectinfo']);
324     }
326     /* Show tab dialog if object is present */
327     if ($this->grouptab){
328       $display= $this->grouptab->execute();
330       /* Don't show buttons if tab dialog requests this */
331       if (!$this->grouptab->by_object[$this->grouptab->current]->dialog){
332         $display.= "<p style=\"text-align:right\">\n";
333         $display.= "<input type=submit name=\"edit_finish\" value=\""._("Finish")."\">\n";
334         $display.= "&nbsp;\n";
335         $display.= "<input type=submit name=\"edit_cancel\" value=\""._("Cancel")."\">\n";
336         $display.= "</p>";
337       }
338       return ($display);
339     }
341     /* Prepare departments */
342     $options= "";
343     foreach ($this->config->idepartments as $key => $value){
344             if ($groupfilter['depselect'] == $key){
345                     $options.= "<option selected value='$key'>$value</option>";
346             } else {
347                     $options.= "<option value='$key'>$value</option>";
348             }
349     }
351     // Managment
352     $listhead = "<div style='background:#F0F0F9;padding:5px;'>".
353       " <input type='image' class='center' src='images/list_back.png' title='"._("Go up one department")."' alt='"._("Up")."' name='dep_back'>&nbsp;".
354       " <input type='image' class='center' src='images/list_root.png' title='"._("Go to root department")."' name='dep_root' alt='"._("Root")."'>&nbsp;".
355       " <input type='image' class='center' src='images/list_home.png' title='"._("Go to users department")."' alt='"._("Home")."' name='dep_home'>&nbsp;".
356       " <img class='center' src='images/list_seperator.png' alt='' height='16' width='1'>&nbsp;".
357       " <input type='image' class='center' src='images/list_new_group.png' title='"._("Create new group")."' alt='"._("New")."' name='group_new'>&nbsp;".
358       " <img class='center' src='images/list_seperator.png' alt='' height='16' width='1'>&nbsp;".
359       _("Current base")."&nbsp;<select name='depselect' onChange='mainform.submit()' class='center'>$options</select>".
360        " <input type='image' class='center' src='images/list_submit.png' title='"._("Submit department")."' name='submit_department' alt='"._("Submit")."'>&nbsp;".
361       "</div>";
363     
364     $actions = "<input class='center' type='image' src='images/edit.png' alt='"._("edit")."' name='group_edit_%KEY%' title='"._("Edit this entry")."'>";
365     $actions.= "<input class='center' type='image' src='images/edittrash.png' alt='"._("delete")."' name='group_del_%KEY%' title='"._("Delete this entry")."'>";
367     // Defining Links
368     $linkopen = "<a href='?plug=".$_GET['plug']."&amp;act=dep_open&amp;dep_id=%s'>%s</a>";
370     // image Buttons 
371     $editlink = "<a href='?plug=".$_GET['plug']."&amp;id=%s&amp;act=edit_entry'>%s</a>";
372     $userimg  = "<img class='center' src='images/select_groups.png' alt='User'    title='%s'>";
374     // Extension images 
375     $posiximg = "<img class='center' src='images/select_groups.png'        alt='P'  title='"._("Posix")  ."'>";
376     $mailimg  = "<img class='center' src='images/mailto.png'             alt='M'  title='"._("Mail")   ."'>";
377     $sambaimg = "<img class='center' src='images/select_winstation.png'  alt='S'  title='"._("Samba")  ."'>";
378     $applimg  = "<img class='center' src='images/select_application.png' alt='A'  title='"._("Application")."'>"; 
379     $phoneimg = "<img class='center' src='images/select_phone.png'      alt='Ph' title='"._("Phone")  ."'>"; 
380     $envimg   = "<img class='center' src='images/network.png'      alt='E' title='"._("Environment")  ."'>"; 
381     // Space
382     $empty    = "<img class='center' src='images/empty.png' style='width:16px;height:16px;' alt=''>";
385     $divlist = new divlist("groupstab");
386     $divlist->SetHeader(array(
387           array("string" => "&nbsp;", "attach" => "style='text-align:center;width:20px;'"),
388           array("string" => _("Groupname")." / "._("Department"), "attach" => "style=''"),
389           array("string" => _("Properties"), "attach" => "style='width:136px;'"),
390           array("string" => _("Actions"), "attach" => "style='width:60px;border-right:0px;text-align:right;'")
391           ));
393     $divlist->SetSummary(_("This table displays all groups, in the selected tree."));
394     $divlist->SetEntriesPerPage(0);
396     foreach($this->departments as $key=> $val){
398       if(!isset($this->config->departments[trim($key)])){
399         $this->config->departments[trim($key)]="";
400       }
402       $non_empty="";
403       $keys= str_replace("/","\/",$key);
404       foreach($this->config->departments as $keyd=>$vald ){
405         if(preg_match("/".$keys."\/.*/",$keyd)){
406           $non_empty="full";
407         }
408       }
411       $field1 = array("string" => "<img src='images/".$non_empty."folder.png' alt='department'>", "attach" => "style='text-align:center;width:20px;'");
412       $field2 = array("string" => sprintf($linkopen,base64_encode($key),$val), "attach" => "style=''");
413       $field3 = array("string" => "&nbsp;", "attach" => "style='width:136px;'");
414       $field4 = array("string" => "&nbsp;", "attach" => "style='width:60px;border-right:0px;text-align:right;'");
416       $divlist->AddEntry(array($field1,$field2,$field3,$field4));
417     }
419     foreach($this->grouplist as $key => $val){
421       if(isset($val['objectClass'])){
422         if(in_array("posixGroup",           $val['objectClass']))   $posix = $posiximg;   else $posix   = $empty;
423         if(in_array("gosaMailAccount",      $val['objectClass']))   $mail  = $mailimg;    else $mail    = $empty;
424         if(in_array("sambaGroupMapping",    $val['objectClass']))   $samba = $sambaimg;   else $samba   = $empty;
425         if(in_array("gosaApplicationGroup", $val['objectClass']))   $appl  = $applimg;    else $appl    = $empty;
426         if(in_array("goFonPickupGroup",     $val['objectClass']))   $phone = $phoneimg;   else $phone   = $empty;
427         if(in_array("gotoEnvironment",      $val['objectClass']))   $enviro= $envimg;     else $enviro  = $empty;
428       }else{
429         $posix=$mail=$samba=$appl=$phone=$empty;
430       }
432       $title = "title='gid : ".$key." - dn : ".$val['dn']."'";
434       if(!isset($val['description'][0])){
435         $desc = "";
436       }else{
437         $desc = " - [ ".$val['description'][0]." ]";
438       }      
439       $field1 = array("string" => sprintf($userimg,$val['dn']), "attach" => "style='text-align:center;width:20px;'");
440       $field2 = array("string" => sprintf($editlink,$key,($val['cn']['0'].$desc)), "attach" => "style='' ".$title);
441       $field3 = array("string" => $posix."&nbsp;".$enviro."&nbsp;".$mail."&nbsp;".$samba."&nbsp;".$appl."&nbsp;".$phone, "attach" => "style='width:136px;'");  
442       $field4 = array("string" => preg_replace("/%KEY%/", $key, $actions), "attach" => "style='width:60px;border-right:0px;text-align:right;'");
443       
444       $divlist->AddEntry(array($field1,$field2,$field3,$field4));    
445     }
447     /* Show main page */
448     $smarty->assign("grouplisthead", $listhead);
449     $smarty->assign("grouplist", $divlist->DrawList());
450     $smarty->assign("search_image", get_template_path('images/search.png'));
451     $smarty->assign("searchu_image", get_template_path('images/search_user.png'));
452     $smarty->assign("tree_image", get_template_path('images/tree.png'));
453     $smarty->assign("infoimage", get_template_path('images/info.png'));
454     $smarty->assign("launchimage", get_template_path('images/launch.png'));
455     $smarty->assign("deplist", $this->config->idepartments);
456     foreach( array("depselect", "guser", "regex", "primarygroups", "mailgroups","appgroups", "sambagroups", "functionalgroups", "subsearch") as $type){
457       $smarty->assign("$type", $groupfilter[$type]);
458     }
460     /* Extend if we are not using javascript */
461     $smarty->assign("apply", apply_filter());
462     $smarty->assign("alphabet", generate_alphabet());
463     $smarty->assign("hint", print_sizelimit_warning());
465     return($smarty->fetch(get_template_path('headpage.tpl', TRUE)));
466   }
468   function reload($CreatePosixsList=false)
469   {
470     /* Get config */
471     $groupfilter= get_global('groupfilter');
473     /* Set base for all searches */
474     $base= $groupfilter['depselect'];
476     /* Regex filter? */
477     if ($groupfilter['regex'] != ""){
478       $regex= $groupfilter['regex'];
479     } else {
480       $regex= "*";
481     }
483     /* User filter? */
484     $filter= "(objectclass=posixGroup)";
485     $error= "";
486     $error2= "";
487     $this->grouplist= array();
489     /* What are primary groups? */
490     $primaries= array();
491     $ldap= $this->config->get_ldap_link();
492     $ldap->cd($base);
493     $ldap->search("(&(uid=$regex)(!(uid=*$))(objectClass=posixAccount)(gidNumber=*))", array("gidNumber", "cn"));
494     show_ldap_error($ldap->get_error());
495     while ($attrs= $ldap->fetch()){
496       $primaries[$attrs['gidNumber'][0]]= $attrs['cn'][0];
497     }
499     /* Set filter depending on selection */
500     $sfilter= "";
501     if ($groupfilter['appgroups'] == "checked"){
502       $filter.= "(objectClass=gosaApplicationGroup)";
503     }
504     if ($this->config->current['SAMBAVERSION'] == 3){
505       if ($groupfilter['primarygroups'] != "checked"){
506         $sfilter= "(objectClass=sambaGroupMapping)";
507       } elseif ($groupfilter['sambagroups'] == "checked"){
508         $filter.= "(objectClass=sambaGroupMapping)";
509       }
510     }
512     if ($groupfilter['mailgroups'] == "checked"){
513       $filter.= "(objectClass=gosaMailAccount)";
514     }
515     $functional= array();
516     $ldap->cd(get_groups_ou().$base);
517     $ldap->set_size_limit($_SESSION['size_limit']);
518     $ldap->search("(&(cn=$regex)(objectClass=posixGroup)(!(|(objectClass=gosaMailAccount)(objectClass=gosaApplicationGroup)$sfilter)))", array("cn", "gidNumber", "description"));
519     $error2= $ldap->error;
520     while ($attrs= $ldap->fetch()){
521       if (!isset($primaries[$attrs['gidNumber'][0]])){
522         $functional[$attrs['gidNumber'][0]]= $attrs['gidNumber'][0];
523       }
524     }
533     /*
534      * We also need to search for the departments
535      * So we are able to navigate like in konquerer
536      */
538     /* Only needed if we are in GroupManagement */
539     if(!$CreatePosixsList){
540       $res3 =  get_list2($this->ui->subtreeACL, "(&(|(ou=$regex)(description=$regex))(objectClass=gosaDepartment))",
541           FALSE, $base, array("ou", "description"), TRUE);
542       $this->departments= array();
543       $tmp = array();
544       foreach ($res3 as $value){
545         $tmp[strtolower($value['dn']).$value['dn']]=$value;
546       }
547       ksort($tmp);
548       foreach($tmp as $value){
549         if(isset($value["description"][0])){
550           $this->departments[$value['dn']]=convert_department_dn2($value['dn'])." - [".$value["description"][0]."]";
551         }else{
552           $this->departments[$value['dn']]= convert_department_dn2($value['dn']);//$value["description"][0];
553         }
554       }
555     }
556     /*  Ende department generation
557      */
559     /* Generate grouplist */
560     if ($filter != ""){
561       $filter= "(&(cn=$regex)(objectClass=posixGroup)(|$filter))";
562       if ($groupfilter['guser'] != ""){
563         $filter= "(&(|(memberUID=" . $groupfilter['guser'] . ")(cn=" . $groupfilter['guser'] . "))$filter)";
564       }
565     }
567     /* Depending on $CreatePosixsList we have to create different lists */
569     if ($groupfilter['subsearch'] == "checked"){
570       $res= get_list($this->ui->subtreeACL, "$filter", FALSE, $base, array("cn", "description", "gidNumber"), TRUE);
571     } else {
572       $base= get_groups_ou().$base;
573       $res= get_list($this->ui->subtreeACL, "$filter", FALSE, $base, array("cn", "description", "gidNumber"), TRUE);
574     }
575     if (preg_match("/size limit/i", $error) || preg_match("/size limit/i", $error2)){
576       $_SESSION['limit_exceeded']= TRUE;
577     }
579     foreach ($res as $value){
580       if ($groupfilter['functionalgroups'] != "checked" && isset($functional[$value['gidNumber'][0]])){
581         continue;
582       }
583       if ($groupfilter['primarygroups'] == "checked"){
584         $this->grouplist[$value['gidNumber'][0]]= $value;
585       } else {
586         if (!isset($primaries[$value['gidNumber'][0]])){
587           $this->grouplist[$value['gidNumber'][0]]= $value;
588         }
589       }
590     }
592     $tmp=array();
594     /* If true ; this result is used for posix tab, group membership selection. */
595     if($CreatePosixsList){
597       /* Addd to array */
598       foreach($this->grouplist as $tkey => $val ){
599         $tmp[strtolower($val['cn'][0]).$val['cn'][0]]=$val;
600       }
601       
602       /* Sort index */
603       ksort($tmp);
605       /* Recreate index array[dn]=cn[description]*/
606       $this->grouplist=array();
607       foreach($tmp as $val){
608         if(isset($val['description'])){
609           $this->grouplist[$val['dn']]=$val['cn'][0]."&nbsp;[".$val['description'][0]."]";
610         }else{
611           $this->grouplist[$val['dn']]=$val['cn'][0];
612         }
613       }
614     }else{
615   
616       /* Create result for group management listbox*/
617       foreach($this->grouplist as $tkey => $val ){
618         $tmp[strtolower($val['cn'][0]).$val['cn'][0]]=$val;
619       }
620       ksort($tmp);
621       $this->grouplist=array();
622       foreach($tmp as $val){
623         $this->grouplist[]=$val;
624       }
625       reset ($this->grouplist);
626     }
627   }
629   function remove_from_parent()
630   {
631     /* Optionally execute a command after we're done */
632     $this->postremove();
633   }
636   /* Save data to object */
637   function save_object()
638   {
639   }
642   /* Check values */
643   function check()
644   {
645   }
648   /* Save to LDAP */
649   function save()
650   {
651     /* Optionally execute a command after we're done */
652     $this->postcreate();
653   }
655   function adapt_from_template($dn)
656   {
657   }
659   function password_change_needed()
660   {
661   }
663   function show_header($button_text, $text, $disabled= FALSE)
664   {
665   }
667   function remove_lock()
668   {
669     if (isset($this->grouptab->dn)){
670       del_lock ($this->grouptab->dn);
671     }
672   }
676 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
677 ?>