ef3a41949f5e6168bea67bae91655eaa2ade52e3
1 <?php
2 class group extends plugin
3 {
4 /* CLI vars */
5 var $cli_summary= "Handling of GOsa's base group object";
6 var $cli_description= "Some longer text\nfor help";
7 var $cli_parameters= array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser");
9 /* Group attributes */
10 var $cn= "";
11 var $description= "";
12 var $gidNumber= "";
13 var $memberUid= array();
15 /* Helpers */
16 var $base= "";
17 var $force_gid= FALSE;
18 var $fon_group= FALSE;
19 var $smbgroup= FALSE;
20 var $groupType= FALSE;
21 var $samba3= FALSE;
22 var $sambaSID= "";
23 var $sambaDomainName= "DEFAULT";
24 var $SID= "";
25 var $ridBase= 0;
26 var $members= array();
27 var $users= array();
28 var $allusers= array();
29 var $department= "";
30 var $saved_gidNumber= "";
31 var $oldgroupType= "";
32 var $orig_dn= "";
33 var $has_mailAccount= FALSE;
34 var $group_dialog= FALSE;
35 var $nagios_group =FALSE;
36 var $sambaGroupType;
37 var $dialog;
39 /* attribute list for save action */
40 var $attributes= array("cn", "description", "gidNumber","memberUid","sambaGroupType","sambaSID");
41 var $objectclasses= array("top", "posixGroup");
43 function group ($config, $dn= NULL)
44 {
45 plugin::plugin ($config, $dn);
47 /* Load attributes depending on the samba version */
48 $this->samba3= ($config->current['SAMBAVERSION'] == 3);
49 $this->orig_dn= $dn;
51 /* Get member list */
52 if (isset($this->attrs['memberUid'][0])){
53 $tmp= array();
54 for ($i= 0; $i<$this->attrs['memberUid']['count']; $i++){
55 $tmp[]= $this->attrs['memberUid'][$i];
56 }
57 $this->memberUid= $tmp;
58 sort ($this->memberUid);
59 }
61 /* Save gidNumber for later use */
62 if (isset($this->attrs['gidNumber'])){
63 $this->saved_gidNumber= $this->attrs['gidNumber'][0];
64 }
66 /* Is a samba group? */
67 if (isset($this->attrs['objectClass'])){
68 if (array_search ('sambaGroupMapping', $this->attrs['objectClass']) == NULL ){
69 $this->smbgroup= FALSE;
70 } else {
71 $this->smbgroup= TRUE;
72 if (isset($this->attrs['sambaSID'])){
73 $this->sambaSID= $this->attrs['sambaSID'][0];
74 }
75 }
76 if (array_search ('goFonPickupGroup', $this->attrs['objectClass']) == NULL ){
77 $this->fon_group= FALSE;
78 } else {
79 $this->fon_group= TRUE;
80 }
81 if (array_search ('nagiosContactGroup', $this->attrs['objectClass']) == NULL ){
82 $this->nagios_group= FALSE;
83 } else {
84 $this->nagios_group= TRUE;
85 }
86 }
88 /* Set mail flag */
89 if (isset($this->attrs['objectClass']) && in_array('gosaMailAccount', $this->attrs['objectClass'])){
90 $this->has_mailAccount= TRUE;
91 }
93 /* Get samba Domain in case of samba 3 */
94 if ($this->samba3 && $this->sambaSID != ""){
95 $this->SID= preg_replace ("/-[^-]+$/", "", $this->sambaSID);
96 $ldap= $this->config->get_ldap_link();
97 $ldap->cd($this->config->current['BASE']);
98 $ldap->search ("(&(objectClass=sambaDomain)(sambaSID=$this->SID))",array("sambaAlgorithmicRidBase"));
99 if ($ldap->count() != 0){
100 $attrs= $ldap->fetch();
101 $this->ridBase= $attrs['sambaAlgorithmicRidBase'][0];
103 /* Get domain name for SID */
104 $this->sambaDomainName= "DEFAULT";
105 foreach ($this->config->data['SERVERS']['SAMBA'] as $key => $val){
106 if ($val['SID'] == $this->SID){
107 $this->sambaDomainName= $key;
108 break;
109 }
110 }
111 } else {
112 if (isset($this->config->current['RIDBASE'])){
113 $this->sambaDomainName= "DEFAULT";
114 $this->ridBase= $this->config->current['RIDBASE'];
115 $this->SID= $this->config->current['SID'];
116 } else {
117 print_red(_("Can't find this groups SID in LDAP or in your configuration file!"));
118 }
119 }
121 /* Get group type */
122 $this->groupType= (int)substr(strrchr($this->sambaSID, "-"), 1);
123 if ($this->groupType < 500 || $this->groupType > 553){
124 $this->groupType= 0;
125 }
126 $this->oldgroupType= $this->groupType;
127 }
129 /* Get global filter config */
130 if (!is_global("gufilter")){
131 $ui= get_userinfo();
132 $base= get_base_from_people($ui->dn);
133 $gufilter= array( "dselect" => $base,
134 "regex" => "*");
135 register_global("gufilter", $gufilter);
136 }
137 $gufilter= get_global('gufilter');
139 /* Bases / Departments */
141 if(isset($_SESSION['groupfilter']['depselect'])){
142 $this->base = $_SESSION['groupfilter']['depselect'];
143 }else{
144 if ($this->dn == "new"){
145 $ui= get_userinfo();
146 $this->base= dn2base($ui->dn);
147 } else {
148 $this->base= preg_replace ("/^[^,]+,[^,]+,/", "", $this->dn);
149 }
150 }
153 /* This is always an account */
154 $this->is_account= TRUE;
155 $this->reload();
156 }
158 function execute()
159 {
160 /* Call parent execute */
161 plugin::execute();
163 $ui= get_userinfo();
164 $acla= get_permissions ($ui->dn, $ui->subtreeACL);
165 $this->acl= get_module_permission($acla, "group", $ui->dn);
166 /* Do we represent a valid group? */
167 if (!$this->is_account && $this->parent == NULL){
168 $display= "<img alt=\"\" src=\"images/stop.png\" align=\"middle\"> <b>".
169 _("This 'dn' is no group.")."</b>";
170 return ($display);
171 }
173 /* Delete user from group */
174 if (isset($_POST['del_users']) && isset($_POST['members'])){
175 foreach ($_POST['members'] as $value){
176 unset ($this->members["$value"]);
177 $this->removeUser($value);
178 }
179 $this->reload();
180 }
182 /* Add objects? */
183 if (isset($_POST["edit_membership"])){
184 $this->group_dialog= TRUE;
185 $this->dialog= TRUE;
186 }
188 /* Add objects finished? */
189 if (isset($_POST["add_users_finish"]) || isset($_POST["add_users_cancel"])){
190 $this->group_dialog= FALSE;
191 $this->dialog= FALSE;
192 }
194 /* Add user to group */
195 if (isset($_POST['add_users_finish']) && isset($_POST['users'])){
196 foreach ($_POST['users'] as $value){
197 $this->members["$value"]= $this->allusers[$value];
198 asort($this->members);
199 $this->addUser($value);
200 }
201 $this->reload();
202 }
204 /* Base select dialog */
205 $once = true;
206 foreach($_POST as $name => $value){
207 if(preg_match("/^chooseBase/",$name) && $once){
208 $once = false;
209 $this->dialog = new baseSelectDialog($this->config);
210 $this->dialog->setCurrentBase($this->base);
211 }
212 }
214 /* Dialog handling */
215 if(is_object($this->dialog)){
216 /* Must be called before save_object */
217 $this->dialog->save_object();
219 if($this->dialog->isClosed()){
220 $this->dialog = false;
221 }elseif($this->dialog->isSelected()){
222 $this->base = $this->dialog->isSelected();
223 $this->dialog= false;
224 }else{
225 return($this->dialog->execute());
226 }
227 }
229 /* Assign templating stuff */
230 $smarty= get_smarty();
231 if ($this->samba3){
232 $smarty->assign("samba3", "true");
233 } else {
234 $smarty->assign("samba3", "");
235 }
237 if(search_config($this->config->data['MENU'], "nagiosaccount", "CLASS")){
238 $smarty->assign("nagios",true);
239 }else{
240 $smarty->assign("nagios",false);
241 }
243 if(search_config($this->config->data['MENU'], "phoneAccount", "CLASS")){
244 $smarty->assign("pickupGroup",true);
245 }else{
246 $smarty->assign("pickupGroup",false);
247 }
249 /* Manage object add dialog */
250 if ($this->group_dialog){
252 /* Save data */
253 $gufilter= get_global("gufilter");
254 foreach( array("dselect", "regex") as $type){
255 if (isset($_POST[$type])){
256 $gufilter[$type]= $_POST[$type];
257 }
258 }
259 if (isset($_GET['search'])){
260 $s= mb_substr($_GET['search'], 0, 1, "UTF8")."*";
261 if ($s == "**"){
262 $s= "*";
263 }
264 $gufilter['regex']= $s;
265 }
266 $regex= preg_replace('/[*]/', ".*", $gufilter['regex']);
267 register_global("gufilter", $gufilter);
268 $this->reload();
270 /* Show dialog */
271 $smarty->assign("search_image", get_template_path('images/search.png'));
272 $smarty->assign("launchimage", get_template_path('images/small_filter.png'));
273 $smarty->assign("tree_image", get_template_path('images/tree.png'));
274 $smarty->assign("deplist", $this->config->idepartments);
275 $smarty->assign("alphabet", generate_alphabet());
276 foreach( array("dselect", "regex") as $type){
277 $smarty->assign("$type", $gufilter[$type]);
278 }
279 $smarty->assign("hint", print_sizelimit_warning());
281 $users= array();
282 foreach ($this->allusers as $key => $value){
283 if (!array_key_exists($key, $this->members)){
284 if (preg_match("/^$regex/i", $key)){
285 $users[$key]= $value;
286 }
287 }
288 }
289 $smarty->assign("users", $users);
290 $smarty->assign("apply", apply_filter());
291 $display= $smarty->fetch (get_template_path('group_objects.tpl', TRUE, dirname(__FILE__)));
292 return ($display);
293 }
295 /* Bases / Departments */
296 if (isset($_POST['base'])){
297 $this->base= $_POST['base'];
298 }
300 $smarty->assign("bases", $this->config->idepartments);
301 $smarty->assign("base_select", $this->base);
302 $smarty->assign("department", $this->department);
304 if ($this->samba3){
305 $domains= array();
306 foreach($this->config->data['SERVERS']['SAMBA'] as $name => $content){
307 $domains[$name]= $name;
308 }
309 $smarty->assign("sambaDomains", $domains);
310 $smarty->assign("sambaDomainName", $this->sambaDomainName);
311 $groupTypes= array(0 => _("Samba group"), 512 => _("Domain admins"), 513 => _("Domain users"),
312 514 => _("Domain guests"));
314 /* Don't loose special groups! If not key'ed above, add it to
315 the combo box... */
316 if ($this->groupType >= 500 && $this->groupType <= 553 && !isset($groupTypes[$this->groupType])){
317 $groupTypes[$this->groupType]= sprintf(_("Special group (%d)"), $this->groupType);
318 }
320 $smarty->assign("groupTypes", $groupTypes);
321 $smarty->assign("groupType", $this->groupType);
322 }
324 /* Members and users */
325 $smarty->assign("members", $this->members);
327 /* Checkboxes */
328 foreach (array("force_gid", "smbgroup") as $val){
329 if ($this->$val == "1"){
330 $smarty->assign("$val", "checked");
331 } else {
332 $smarty->assign("$val", "");
333 }
334 }
335 if ($this->force_gid != "1"){
336 $smarty->assign("forceMode", "disabled");
337 }else{
338 $smarty->assign("forceMode", "");
339 }
340 $smarty->assign("force_gidACL", chkacl($this->acl, "gidNumber"));
341 $smarty->assign("sambaDomainNameACL", chkacl($this->acl, "sambaDomainName"));
342 if ($this->fon_group){
343 $smarty->assign("fon_group", "checked");
344 } else {
345 $smarty->assign("fon_group", "");
346 }
347 $smarty->assign("fon_groupACL", chkacl($this->acl, "fon_group"));
349 if ($this->nagios_group){
350 $smarty->assign("nagios_group", "checked");
351 } else {
352 $smarty->assign("nagios_group", "");
353 }
354 $smarty->assign("nagios_groupACL", chkacl($this->acl, "nagios_group"));
356 /* Fields */
357 foreach (array("cn", "description", "gidNumber") as $val){
358 $smarty->assign("$val", $this->$val);
359 $smarty->assign("$val"."ACL", chkacl($this->acl, "$val"));
360 }
362 /* Missing ACL's */
363 foreach (array("base", "smbgroup", "members") as $val){
364 $smarty->assign("$val"."ACL", chkacl($this->acl, "$val"));
365 }
367 /* Show main page */
368 $smarty->assign("alphabet", generate_alphabet(10));
369 $smarty->assign("search_image", get_template_path('images/search.png'));
370 $smarty->assign("launchimage", get_template_path('images/small_filter.png'));
371 $smarty->assign("tree_image", get_template_path('images/tree.png'));
372 $smarty->assign("deplist", $this->config->idepartments);
373 return($smarty->fetch (get_template_path('generic.tpl', TRUE)));
374 }
376 function addUser($uid)
377 {
378 $this->memberUid[]= $uid;
379 $this->memberUid= array_unique($this->memberUid);
380 }
382 function removeUser($uid)
383 {
384 $temp= array();
385 foreach ($this->memberUid as $value){
386 if ($value != $uid){
387 $temp[]= $value;
388 }
389 }
390 $this->memberUid= $temp;
391 }
394 /* Reload data */
395 function reload()
396 {
397 /* Generate userlists */
398 $this->last_sorting= "invalid";
399 $this->users= array();
400 $ldap= $this->config->get_ldap_link();
401 $gufilter= get_global("gufilter");
403 $ldap->cd ($this->config->current['BASE']);
404 $ldap->search ("(&(objectClass=gosaAccount)(!(objectClass=gosaUserTemplate))(!(uid=*$)))",array("uid", "sn", "givenName"));
405 $this->allusers= array();
406 while ($attrs= $ldap->fetch()){
407 if (isset($attrs["givenName"][0]) && isset($attrs["sn"][0])){
408 $this->allusers[$attrs["uid"][0]]= $attrs["sn"][0].", ".
409 $attrs["givenName"][0]." [".$attrs["uid"][0]."]";
410 } else {
411 $this->allusers[$attrs["uid"][0]]= $attrs['uid'][0];
412 }
413 }
414 natcasesort ($this->allusers);
415 reset ($this->allusers);
417 /* Fill memberlist */
418 $this->members= array();
419 foreach ($this->memberUid as $value){
420 if (isset($this->allusers[$value])){
421 $this->members[$value]= $this->allusers[$value];
422 } else {
423 $this->members[$value]= "[$value]";
424 }
425 }
426 asort($this->members);
427 reset($this->members);
428 }
432 function remove_from_parent()
433 {
434 plugin::remove_from_parent();
436 $ldap= $this->config->get_ldap_link();
437 $ldap->rmdir($this->dn);
438 show_ldap_error($ldap->get_error());
440 /* Delete references to object groups */
441 $ldap->cd ($this->config->current['BASE']);
442 $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".$this->dn."))", array("cn"));
443 while ($ldap->fetch()){
444 $og= new ogroup($this->config, $ldap->getDN());
445 unset($og->member[$this->dn]);
446 $og->save ();
447 }
449 /* Send signal to the world that we've done */
450 $this->handle_post_events("remove");
451 }
454 /* Save data to object */
455 function save_object()
456 {
457 /* Save additional values for possible next step */
458 if (isset($_POST['groupedit'])){
459 plugin::save_object();
461 $this->force_gid= 0;
462 $this->smbgroup= 0;
463 foreach (array("force_gid", "department", "base", "smbgroup") as $val) {
464 if (chkacl ($this->acl, "$val") == "" && isset($_POST["$val"])){
465 $this->$val= $_POST["$val"];
466 }
467 }
469 /* Save sambaDomain attribute */
470 if (chkacl ($this->acl, "sambaDomainName") == "" && $this->samba3 &&
471 isset ($_POST['sambaDomainName'])){
473 $this->sambaDomainName= $_POST['sambaDomainName'];
474 $this->groupType= $_POST['groupType'];
475 }
477 /* Save fon attribute */
478 if (chkacl ($this->acl, "fon_group") == ""){
479 if (isset ($_POST['fon_group'])){
480 $this->fon_group= TRUE;
481 } else {
482 $this->fon_group= FALSE;
483 }
484 }
485 if (chkacl ($this->acl, "nagios_group") == ""){
486 if (isset ($_POST['nagios_group'])){
487 $this->nagios_group= TRUE;
488 } else {
489 $this->nagios_group= FALSE;
490 }
491 }
492 }
493 }
496 /* Save to LDAP */
497 function save()
498 {
499 /* ID handling */
500 if ($this->force_gid == 0){
501 if ($this->saved_gidNumber != ""){
502 $this->gidNumber= $this->saved_gidNumber;
503 } else {
504 /* Calculate new, lock uids */
505 $wait= 10;
506 while (get_lock("uidnumber") != ""){
507 sleep (1);
509 /* timed out? */
510 if ($wait-- == 0){
511 break;
512 }
513 }
514 add_lock ("uidnumber", "gosa");
515 $this->gidNumber= $this->get_next_id("gidNumber");
516 }
517 }
519 plugin::save();
521 /* Remove objectClass for samba/phone support */
522 $tmp= array();
523 for ($i= 0; $i<count($this->attrs["objectClass"]); $i++){
524 if ($this->attrs['objectClass'][$i] != 'sambaGroupMapping' &&
525 $this->attrs['objectClass'][$i] != 'sambaIdmapEntry' &&
526 $this->attrs['objectClass'][$i] != 'goFonPickupGroup' &&
527 $this->attrs['objectClass'][$i] != 'nagiosContactGroup'){
528 $tmp[]= $this->attrs['objectClass'][$i];
529 }
530 }
531 $this->attrs['objectClass']= $tmp;
532 $ldap= $this->config->get_ldap_link();
534 /* Add samba group functionality */
535 if ($this->samba3 && $this->smbgroup){
537 /* Fixed undefined index ...
538 */
539 $this->SID = $this->ridBase = "";
540 if(isset($this->config->data['SERVERS']['SAMBA'][$this->sambaDomainName]['SID'])){
541 $this->SID = $this->config->data['SERVERS']['SAMBA'][$this->sambaDomainName]['SID'];
542 }else{
543 print_red(sprintf(_("No configured SID found for '%s'."),$this->sambaDomainName));
544 }
545 if(isset($this->config->data['SERVERS']['SAMBA'][$this->sambaDomainName]['RIDBASE'])){
546 $this->ridBase= $this->config->data['SERVERS']['SAMBA'][$this->sambaDomainName]['RIDBASE'];
547 }else{
548 print_red(sprintf(_("No configured RIDBASE found for '%s'."),$this->sambaDomainName));
549 }
551 $this->attrs['objectClass'][]= 'sambaGroupMapping';
552 $this->attrs['sambaGroupType']= "2";
554 /* Check if we need to create a special entry */
555 if ($this->groupType == 0){
557 if ($this->sambaSID == "" || $this->oldgroupType != $this->groupType){
558 $gidNumber= $this->gidNumber;
559 while(TRUE){
560 $sid= $this->SID."-".($gidNumber*2 + $this->ridBase+1);
561 $ldap->cd($this->config->current['BASE']);
562 $ldap->search("(sambaSID=$sid)",array("sambaSID"));
563 if ($ldap->count() == 0){
564 break;
565 }
566 $gidNumber++;
567 }
568 $this->attrs['sambaSID']= $sid;
569 $this->sambaSID= $sid;
570 }
572 } else {
573 $this->attrs['sambaSID']=$this->SID."-".$this->groupType;
574 }
576 /* User wants me to fake the idMappings? This is useful for
577 making winbind resolve the group names in a reasonable amount
578 of time in combination with larger databases. */
579 if (isset($this->config->current['SAMBAIDMAPPING']) &&
580 preg_match('/true/i', $this->config->current['SAMBAIDMAPPING'])){
581 $this->attrs['objectClass'][]= "sambaIdmapEntry";
582 }
584 }
586 /* Add phone functionality */
587 if ($this->fon_group){
588 $this->attrs['objectClass'][]= "goFonPickupGroup";
589 }
591 /* Add nagios functionality */
592 if ($this->nagios_group){
593 $this->attrs['objectClass'][]= "nagiosContactGroup";
594 }
596 /* Take members array */
597 if (count ($this->memberUid)){
598 $this->attrs['memberUid']= array_unique($this->memberUid);
599 }
601 /* New accounts need proper 'dn', propagate it to remaining objects */
602 if ($this->dn == 'new'){
603 $this->dn= 'cn='.$this->cn.','.get_groups_ou().$this->base;
604 }
606 /* Save data. Using 'modify' implies that the entry is already present, use 'add' for
607 new entries. So do a check first... */
608 $ldap->cat ($this->dn);
609 if ($ldap->fetch()){
610 /* Modify needs array() to remove values :-( */
611 if (!count ($this->memberUid)){
612 $this->attrs['memberUid']= array();
613 }
614 if ($this->samba3){
615 if (!$this->smbgroup){
616 $this->attrs['sambaGroupType']= array();
617 $this->attrs['sambaSID']= array();
618 }
619 }
620 $mode= "modify";
621 } else {
622 $mode= "add";
623 $ldap->cd($this->config->current['BASE']);
624 $ldap->create_missing_trees(preg_replace('/^[^,]+,/', '', $this->dn));
625 }
627 /* Write back to ldap */
628 $ldap->cd($this->dn);
629 $this->cleanup();
630 $ldap->$mode($this->attrs);
632 $ret= 0;
633 if (show_ldap_error($ldap->get_error())){
634 $ret= 1;
635 }
637 /* Remove uid lock */
638 del_lock ("uidnumber");
640 /* Post that we've done*/
641 $this->handle_post_events($mode);
643 return ($ret);
644 }
646 function check()
647 {
648 $message= array();
650 /* Permissions for that base? */
651 if ($this->base != ""){
652 $new_dn= 'cn='.$this->cn.','.get_groups_ou().$this->base;
653 } else {
654 $new_dn= $this->dn;
655 }
657 $ui= get_userinfo();
658 $acl= get_permissions ($ui->dn, $ui->subtreeACL);
659 $acl= get_module_permission($acl, "group", $ui->dn);
660 if (chkacl($this->acl, "create") != ""){
661 $message[]= _("You have no permissions to create a group on this 'Base'.");
662 }
664 /* must: cn */
665 if ($this->cn == "" && chkacl ($this->acl, "cn") == ""){
666 $message[]= "The required field 'Name' is not set.";
667 }
669 /* Check for valid input */
670 if (!is_uid($this->cn)){
671 $message[]= _("The field 'Name' contains invalid characters. Lowercase, numbers and dashes are allowed.");
672 }
674 /* Check for used 'cn' */
675 $ldap= $this->config->get_ldap_link();
676 $ldap->cd($this->config->current['BASE']);
677 $ldap->search("(&(|(objectClass=gosaGroupOfNames)(objectClass=posixGroup))(cn=$this->cn))",array("cn"));
678 if ($ldap->count() != 0){
680 /* New entry? */
681 if ($this->dn == 'new'){
682 $message[]= _("Value specified as 'Name' is already used.");
683 }
685 /* Moved? */
686 elseif ($new_dn != $this->orig_dn){
687 $ldap->fetch();
688 if ($ldap->getDN() != $this->orig_dn){
689 $message[]= _("Value specified as 'Name' is already used.");
690 }
691 }
692 }
694 /* Check ID */
695 if ($this->force_gid == "1"){
696 if (!is_id($this->gidNumber)){
697 $message[]= _("Value specified as 'GID' is not valid.");
698 } else {
699 if ($this->gidNumber < $this->config->current['MINID']){
700 $message[]= _("Value specified as 'GID' is too small.");
701 }
703 }
704 }
706 return ($message);
707 }
709 function get_next_id($attrib)
710 {
711 $ids= array();
712 $ldap= $this->config->get_ldap_link();
714 $ldap->cd ($this->config->current['BASE']);
715 if (preg_match('/gidNumber/i', $attrib)){
716 $oc= "posixGroup";
717 } else {
718 $oc= "posixAccount";
719 }
720 $ldap->search ("(&(objectClass=$oc)($attrib=*))", array("$attrib"));
722 /* Get list of ids */
723 while ($attrs= $ldap->fetch()){
724 $ids[]= (int)$attrs["$attrib"][0];
725 }
727 /* Find out next free id near to UID_BASE */
728 for ($id= $this->config->current['UIDBASE']; $id++; $id<65000){
729 if (!in_array($id, $ids)){
730 return ($id);
731 }
732 }
734 /* Should not happen */
735 if ($id == 65000){
736 print_red(_("Too many users, can't allocate a free ID!"));
737 exit;
738 }
739 }
741 }
743 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
744 ?>