Commit 7d48d6ba by Zen-PC\Zen

Zen : edit Profile page => pathentity

parent 856329a6
...@@ -96,8 +96,8 @@ class ProfilesController extends AppController ...@@ -96,8 +96,8 @@ class ProfilesController extends AppController
$birthdate = explode("/", $this->request->data['UserPersonals']['birthdate']); $birthdate = explode("/", $this->request->data['UserPersonals']['birthdate']);
$birthdate = $birthdate[2].'-'.$birthdate[1].'-'.$birthdate[0]; $birthdate = $birthdate[2].'-'.$birthdate[1].'-'.$birthdate[0];
// pr($userPersonals);die; // pr($userPersonals);die;
// $userPersonals = $this->UserPersonals->patchEntity($userPersonals, $data['UserPersonals']); $userPersonals = $this->UserPersonals->patchEntity($userPersonals, $data['UserPersonals']);
$userPersonals['firstname_th'] = $this->request->data['UserPersonals']['firstname_th']; $userPersonals['firstname_th'] = $this->request->data['UserPersonals']['firstname_th'];
$userPersonals['lastname_th'] = $this->request->data['UserPersonals']['lastname_th']; $userPersonals['lastname_th'] = $this->request->data['UserPersonals']['lastname_th'];
$userPersonals['email'] = $this->request->data['email']; $userPersonals['email'] = $this->request->data['email'];
...@@ -106,9 +106,7 @@ class ProfilesController extends AppController ...@@ -106,9 +106,7 @@ class ProfilesController extends AppController
$userPersonals['master_country_id'] = $this->request->data['master_country_id']; $userPersonals['master_country_id'] = $this->request->data['master_country_id'];
$userPersonals['master_province_id'] = $this->request->data['master_province_id']; $userPersonals['master_province_id'] = $this->request->data['master_province_id'];
$userPersonals['modified_by'] = $id; $userPersonals['modified_by'] = $id;
// $userPersonals = $this->UserPersonals->patchEntity($userPersonals, $data['UserPersonals']); // pr($userPersonals);die;
$userPersonals = $this->Users->patchEntity($userPersonals, $this->request->getData());
// pr($userPersonals);die;
if ($this->UserPersonals->save($userPersonals)) { if ($this->UserPersonals->save($userPersonals)) {
$this->Flash->success(__('Update Complete.')); $this->Flash->success(__('Update Complete.'));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment