diff options
| author | Patrick Seeger <pseeger@ccwn.org> | 2012-06-25 23:31:16 +0200 |
|---|---|---|
| committer | Patrick Seeger <pseeger@ccwn.org> | 2012-06-25 23:31:16 +0200 |
| commit | d58f7cf02dc0c5ce2df2f0db00361fe673074be8 (patch) | |
| tree | de5b7064e43255a471de4cb469a7db71bce3d328 /protected/controllers/UserController.php | |
| parent | 82f5b7dc1890c03ebec349225e76ea0b22ec6c1d (diff) | |
Änderungen das alles tut, editor, cms
Diffstat (limited to 'protected/controllers/UserController.php')
| -rw-r--r-- | protected/controllers/UserController.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/protected/controllers/UserController.php b/protected/controllers/UserController.php index 3c28e7b..f4fe415 100644 --- a/protected/controllers/UserController.php +++ b/protected/controllers/UserController.php @@ -77,7 +77,12 @@ class UserController extends Controller { // $this->performAjaxValidation($model); if (isset($_POST['User'])) { + $change = false; + if ($_POST['User']['password'] != "" && $_POST['User']['password'] != $model->password) { $change = true;} $model->attributes = $_POST['User']; + if($change) { + $model->password = $model->encryptPassword($_POST['User']['password']); + } if ($model->save()) { $this->redirect(array('view', 'id'=>$model->id)); } |
