password
This commit is contained in:
parent
3cec5cb867
commit
889e67b4d9
|
@ -94,11 +94,10 @@ class User extends AppModel {
|
||||||
public function replace_password($data,$password){
|
public function replace_password($data,$password){
|
||||||
$dataSource = $this->getDataSource();
|
$dataSource = $this->getDataSource();
|
||||||
$dataSource->begin();
|
$dataSource->begin();
|
||||||
$this->id = $data['User']['id'];
|
$this->id = $data['User']['id'];
|
||||||
|
$result = $this->saveField('password',$password);
|
||||||
if($result)
|
if($result)
|
||||||
$result = $this->saveField('code','');
|
$result = $this->saveField('code','');
|
||||||
if($result)
|
|
||||||
$result = $this->saveField('password',$password);
|
|
||||||
|
|
||||||
if($result) {
|
if($result) {
|
||||||
$dataSource->commit();
|
$dataSource->commit();
|
||||||
|
|
Loading…
Reference in New Issue