From 79e4717bee4902377b3219da42b1afca06dd43a6 Mon Sep 17 00:00:00 2001 From: Alexandre Cases Date: Fri, 10 Jun 2016 20:50:04 +0200 Subject: [PATCH] Version: 2.4.3.7 --- README-LABINVENT.md | 4 ++-- src/Controller/UsersController.php | 6 +++++- src/Template/Configurations/edit.ctp | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/README-LABINVENT.md b/README-LABINVENT.md index 7e3cf0b..592119f 100755 --- a/README-LABINVENT.md +++ b/README-LABINVENT.md @@ -51,9 +51,9 @@ Logiciel testé et validé sur les configurations suivantes : VERSION ACTUELLE Date: 10/06/2016 -Version: 2.4.3.6 +Version: 2.4.3.7 -Configurations / form - Visibilité infos ldap +Ajout utilisateur - Mode ldap --> Bugfixes utilisateur sans mail Version majeure en cours (2.5): https://projects.irap.omp.eu/versions/99 diff --git a/src/Controller/UsersController.php b/src/Controller/UsersController.php index 5e158b8..cb93bad 100755 --- a/src/Controller/UsersController.php +++ b/src/Controller/UsersController.php @@ -204,7 +204,11 @@ class UsersController extends AppController if (!empty($u[$i][$this->request->session()->read('authType')][0])) { if ($userName == $u[$i]['givenname'][0].' '.$u[$i]['sn'][0]) { - $this->set ('email', $u[$i]['mail'][0] ); + if (isset($u[$i]['mail'][0]) && filter_var($u[$i]['mail'][0], FILTER_VALIDATE_EMAIL)) { + $this->set ('email', $u[$i]['mail'][0] ); + } else { + $this->set ('email', ' '); + } } } diff --git a/src/Template/Configurations/edit.ctp b/src/Template/Configurations/edit.ctp index e6a5815..18142b9 100644 --- a/src/Template/Configurations/edit.ctp +++ b/src/Template/Configurations/edit.ctp @@ -29,7 +29,7 @@ echo $this->Form->input('emailGuest5', ['label' => 'Mail guest 5']); echo $this->Form->input('use_ldap', ['label' => 'Utilisation du LDAP', 'onchange' => 'display_ldap();']); - echo '
'; + echo '
'; echo $this->Form->input('host_ldap', ['label' => 'Host du LDAP']); echo $this->Form->input('port_ldap', ['label' => 'Port du LDAP']); echo $this->Form->input('authentificationType_ldap', ['label' => 'Type d\'authentification du LDAP']); -- libgit2 0.21.2