index 16198fe7b33b891b5b334bfd7c82b63098a11fd3..63f9b545ad2f0f4f5a9aa3f9157a46e262e54ffb 100644 (file)
plugin::plugin ($config, $dn);
$this->orig_dn = $this->dn;
- $this->new_dn = $this->dn;
-
- $this->new_dn = $dn;
+ $this->new_dn = $dn;
if ($this->config->current['GOVERNMENTMODE']){
/* Fix public visible attribute if unset */
return (0);
}
-
- /* Check formular input */
- function check()
+
+ function update_new_dn()
{
- /* Call common method to give check the hook */
- $message= plugin::check();
-
$pt= "";
if(isset($this->config->current['INCLUDE_PERSONAL_TITLE']) && preg_match("/true/i",$this->config->current['INCLUDE_PERSONAL_TITLE'])){
if(!empty($this->personalTitle)){
$this->new_dn= $this->create_unique_dn('cn', get_people_ou().$this->base);
}
}
+ }
+
+
+ /* Check formular input */
+ function check()
+ {
+ /* Call common method to give check the hook */
+ $message= plugin::check();
+
+ $this->update_new_dn();
/* Set the new acl base */
if($this->dn == "new") {
$ret['is_modified'] = $this->is_modified;
$ret['base']=$this->base;
- print_a($ret);
return($ret);
}
/* Call check() to set new_dn correctly ... */
$message = plugin::multiple_check();
-
-
- $pt= "";
- if(isset($this->config->current['INCLUDE_PERSONAL_TITLE']) && preg_match("/true/i",$this->config->current['INCLUDE_PERSONAL_TITLE'])){
- if(!empty($this->personalTitle)){
- $pt = $this->personalTitle." ";
- }
- }
- $this->cn= $pt.$this->givenName." ".$this->sn;
-
- /* Permissions for that base? */
- if (isset($this->config->current['DNMODE']) && $this->config->current['DNMODE'] == "uid"){
- $this->new_dn= 'uid='.$this->uid.','.get_people_ou().$this->base;
- } else {
- if($this->orig_base == $this->base ){
- $this->new_dn= $this->dn;
- } else {
- $this->new_dn= $this->create_unique_dn('cn', get_people_ou().$this->base);
- }
- }
-
/* Set the new acl base */
if($this->dn == "new") {
$this->set_acl_base($this->base);