From 889e67b4d9064ec315c56ac1c518b2384af96ae0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20M=C3=BCller?= Date: Sun, 11 May 2014 15:29:18 +0200 Subject: [PATCH] password --- app/Model/User.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/Model/User.php b/app/Model/User.php index 54522fb..03754bf 100755 --- a/app/Model/User.php +++ b/app/Model/User.php @@ -94,11 +94,10 @@ class User extends AppModel { public function replace_password($data,$password){ $dataSource = $this->getDataSource(); $dataSource->begin(); - $this->id = $data['User']['id']; + $this->id = $data['User']['id']; + $result = $this->saveField('password',$password); if($result) $result = $this->saveField('code',''); - if($result) - $result = $this->saveField('password',$password); if($result) { $dataSource->commit();