On Thursday 03 March 2005 16:03, Cajus Pollmeier wrote: > Um. No. It will break normal user handling. The fix has to be placed in the > usermanagement plugin. Try the attached one.
Of course, you're right. Besides a typo in your patch, your patch seems to work correctly. A new patch without the typo is attached. Thank you very much for your help! Carsten
--- class_userManagement.inc.orig Mon Jan 17 18:32:31 2005 +++ class_userManagement.inc Fri Mar 4 21:25:28 2005 @@ -471,10 +471,13 @@ $this->usertab->uid= $this->uid; $this->usertab->sn= $this->sn; $this->usertab->givenName= $this->givenName; - $this->usertab->adapt_from_template($_POST['template']); + $template_dn= $_POST['template']; + $this->usertab->adapt_from_template($template_dn); + $template_base= preg_replace("/^[^,]+,".get_people_ou().",/", '', $template_dn); + $this->usertab->by_object['user']->base= $template_base; /* Set up the users ACL's for this 'dn' */ - $acl= get_permissions ($this->config->departments[$this->usertab->by_object['user']->base], $this->ui->subtreeACL); + $acl= get_permissions ($template_base, $this->ui->subtreeACL); $this->usertab->set_acl($acl); }