Ver código fonte

Profil utilisateur : permettre édition adresse email #981

feature/souke
Guillaume Bourgeois 1 ano atrás
pai
commit
22066ed6e6
2 arquivos alterados com 1 adições e 5 exclusões
  1. +0
    -4
      frontend/controllers/UserController.php
  2. +1
    -1
      frontend/views/user/update.php

+ 0
- 4
frontend/controllers/UserController.php Ver arquivo

@@ -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);

+ 1
- 1
frontend/views/user/update.php Ver arquivo

@@ -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>

Carregando…
Cancelar
Salvar