@@ -85,10 +85,6 @@ class UserController extends FrontendController | |||
if ($model->load($this->getRequest()->post()) | |||
&& $model->validate()) { | |||
// l'utilisateur ne peut pas changer d'adresse email | |||
$oldModel = $this->findModel($idUser); | |||
$model->email = $oldModel->email; | |||
// modification du mot de passe | |||
if (strlen($model->password_new)) { | |||
$model->password_hash = \Yii::$app->security->generatePasswordHash($model->password_new); |
@@ -56,7 +56,7 @@ $this->title = 'Mon profil' ; | |||
<?= $form->field($model, 'lastname')->textInput() ?> | |||
<?= $form->field($model, 'name')->textInput() ?> | |||
<?= $form->field($model, 'phone')->textInput() ?> | |||
<?= $form->field($model, 'email')->textInput(['readonly' => true]); ?> | |||
<?= $form->field($model, 'email')->textInput(); ?> | |||
<?= $form->field($model, 'address')->textarea() ?> | |||
<h2>Mot de passe</h2> |