index 4117aee961f59e0ffd72c776bfef3880ad82830a..c24f100f06db46e18e03179de982bf3b060dba37 100644 (file)
} else {
if(is_array($this->dateOfBirth)){
$date = $this->dateOfBirth;
- }else{
+
+ // Trigger on dates like 1985-04-01, getdate only understands timestamps
+ } else if (!empty($this->dateOfBirth) && !is_numeric($this->dateOfBirth)){
+ $date= getdate(strtotime($this->dateOfBirth));
+
+ } else {
$date = getdate($this->dateOfBirth);
}
}
/* 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){
} 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){
$message= plugin::check();
/* Assemble cn */
- $this->cn= $this->givenName." ".$this->sn;
+ $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"){