Sfoglia il codice sorgente

Profil utilisateur : permettre édition adresse email #981

feature/souke
Guillaume Bourgeois 1 anno fa
parent
commit
22066ed6e6
2 ha cambiato i file con 1 aggiunte e 5 eliminazioni
  1. +0
    -4
      frontend/controllers/UserController.php
  2. +1
    -1
      frontend/views/user/update.php

+ 0
- 4
frontend/controllers/UserController.php Vedi File

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

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

Loading…
Annulla
Salva