diff --git a/core/module/user/user.php b/core/module/user/user.php index 955d693d..916ad5bc 100644 --- a/core/module/user/user.php +++ b/core/module/user/user.php @@ -595,11 +595,14 @@ class user extends common { // Soumission du formulaire if ($this->isPost()) { + // Nombre de profils de ce groupe + $group = $this->getInput('profilAddGroup'); + $profil = (string) (count($this->getData(['profil', $group])) + 1); // Sauvegarder les données $this->setData([ 'profil', - $this->getInput('profilAddGroup'), - $this->getInput('profilAddProfil'), + $group, + $profil, [ 'name' => $this->getInput('profilAddName', helper::FILTER_STRING_SHORT, true), 'readonly' => false, diff --git a/core/module/user/view/profilAdd/profilAdd.php b/core/module/user/view/profilAdd/profilAdd.php index d41bfc35..be724994 100644 --- a/core/module/user/view/profilAdd/profilAdd.php +++ b/core/module/user/view/profilAdd/profilAdd.php @@ -21,13 +21,13 @@