index 803f6ce5797cd70821a92a532c34a93efa4e7d69..46ecbc77d434db966131cb7fe6910dbc588d2228 100644 (file)
plugin::save ();
if ($this->use_dob == "1"){
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();
}
/* Remove additional objectClasses */
$tmp= array();
/* Ok. User exists. Remove him/her when pw_storage has
changed to be NOT kerberos. */
/* 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){
$ret= kadm5_delete_principal ( $handle, $principal);
if ($ret === FALSE){
} else {
} 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){
$ret= kadm5_create_principal ( $handle, $principal);
if ($ret === FALSE){
$message= plugin::check();
/* Assemble cn */
$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"){
/* Permissions for that base? */
if (isset($this->config->current['DNMODE']) && $this->config->current['DNMODE'] == "uid"){