X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=plugins%2Fpersonal%2Fgeneric%2Fclass_user.inc;h=46ecbc77d434db966131cb7fe6910dbc588d2228;hb=7697f34f9e7b22c3c38d429278e667f46a087f2b;hp=803f6ce5797cd70821a92a532c34a93efa4e7d69;hpb=961e1bb9813d66d1f1bf98163cbb1e0518ae8379;p=gosa.git diff --git a/plugins/personal/generic/class_user.inc b/plugins/personal/generic/class_user.inc index 803f6ce57..46ecbc77d 100644 --- a/plugins/personal/generic/class_user.inc +++ b/plugins/personal/generic/class_user.inc @@ -690,7 +690,10 @@ class user extends plugin plugin::save (); if ($this->use_dob == "1"){ - $this->attrs['dateOfBirth']= date("Y-m-d", $this->attrs['dateOfBirth']); + /* If it is an array, the generic page has never been loaded - so there's no difference. Using an array would cause an error btw. */ + if(!is_array($this->attrs['dateOfBirth'])) { + $this->attrs['dateOfBirth']= date("Y-m-d", $this->attrs['dateOfBirth']); + } } /* Remove additional objectClasses */ $tmp= array(); @@ -944,7 +947,7 @@ class user extends plugin /* Ok. User exists. Remove him/her when pw_storage has changed to be NOT kerberos. */ - if ($this->pw_storage != "kerberos"){ + if ($this->pw_storage != $this->config->current['KRBSASL']){ $ret= kadm5_delete_principal ( $handle, $principal); if ($ret === FALSE){ @@ -954,8 +957,8 @@ class user extends plugin } else { - /* User doesn't exists, create it when pw_storage is kerberos. */ - if ($this->pw_storage == "kerberos"){ + /* User doesn't exists, create it when pw_storage is kerberos or SASL. */ + if ($this->pw_storage == "kerberos" || $this->pw_storage == "sasl" ){ $ret= kadm5_create_principal ( $handle, $principal); if ($ret === FALSE){ @@ -990,7 +993,12 @@ class user extends plugin $message= plugin::check(); /* Assemble cn */ - $this->cn= $this->givenName." ".$this->sn; + if ($this->personalTitle == ""){ + $pt= ""; + } else { + $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"){