summaryrefslogtreecommitdiff
path: root/protected/controllers/UserController.php
diff options
context:
space:
mode:
authorastaf <astaf@proxy.ccwn.org.ccwn.org>2012-06-26 17:11:26 +0200
committerastaf <astaf@proxy.ccwn.org.ccwn.org>2012-06-26 17:11:26 +0200
commitf0e90d88a5766e67ff69339b27711ffb5f41e1ca (patch)
tree387f30bc7cd39114f6db71a7deb7d5f16442c03c /protected/controllers/UserController.php
parent1a52e642b8bb388fd4c4b29798fa3809a2114c9f (diff)
parentd58f7cf02dc0c5ce2df2f0db00361fe673074be8 (diff)
Merge branch 'master' of ssh://proxy:9044/home/ccwn/git-repos/admin.astaf.de
Diffstat (limited to 'protected/controllers/UserController.php')
-rw-r--r--protected/controllers/UserController.php5
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));
}