Commit f365a219 by Wittaya-PIM

update

parent 1cf54a6a
......@@ -231,7 +231,7 @@ class UserCardsController extends AppController
}
public function viewCard($user_id = null){
$this->viewBuilder()->layout('blank');
// $user = $this->Auth();
$user_id = $this->Auth->user('id');
$this->loadModel('UserCards');
$UserCards = $this->UserCards->find('all')
->select($this->UserCards)
......@@ -302,8 +302,8 @@ class UserCardsController extends AppController
$userCard['date_expiry'] = $TempUserCards['date_expiry'];
$userCard['signature'] = $TempUserCards['signature'];
$userCard['is_used'] = $TempUserCards['is_used'];
$userCard['created_by'] = 1;
$userCard['user_id'] = 1;
$userCard['created_by'] = $this->Auth->user('id');
$userCard['user_id'] = $this->Auth->user('id');
// pr($userCard);die;
if ($this->UserCards->save($userCard)) {
// pr('sdsd');die;
......
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