Commit 4dd283e1 by Prasong Putichanchai

update user

parent 68b33d4e
......@@ -28,6 +28,7 @@ class ProfilesController extends AppController
'user_id' => $id ]
])->first();
//********DropdownCountry********
$this->loadModel('MasterCountries');
$Country = $this->MasterCountries->find('list', [
......@@ -55,8 +56,6 @@ class ProfilesController extends AppController
$dateNow = $res->i18nFormat('dd/MM/yyyy');
if ($this->request->is(['patch', 'post', 'put'])) {
// pr($this->request->data['email']);die;
$data = $this->request->data;
// pr($this->request->data);die;
......
......@@ -306,7 +306,6 @@ class UserCardsController extends AppController
$userCard['user_id'] = $this->Auth->user('id');
// pr($userCard);die;
if ($this->UserCards->save($userCard)) {
// pr('sdsd');die;
$TempUserCards['is_used'] = 0;
$this->TempUserCards->save($TempUserCards);
$this->loadModel('UserEntities');
......@@ -321,8 +320,8 @@ class UserCardsController extends AppController
$UserEntities = $this->UserEntities->newEntity();
$UserEntities['entity_code'] = $TempUserCards['organize_id'];
$UserEntities['user_id'] = $this->Auth->user('id');
$UserEntities['created_by'] = $this->Auth->user('id');
$UserEntities['modified_by'] = $this->Auth->user('id');
$UserEntities['create_uid'] = $this->Auth->user('id');
$UserEntities['update_uid'] = $this->Auth->user('id');
$this->UserEntities->save($UserEntities);
}
......
......@@ -123,6 +123,7 @@ class UsersController extends AppController {
$this->viewBuilder()->layout('blank');
}
#---------------------------------------------------------------------------------------------------
#Signup
......@@ -421,13 +422,23 @@ class UsersController extends AppController {
#---------------------------------------------------------------------------------------------------
public function signout()
{
$this->checkToken();
/**
*
* Function user logout / signout
* @author sarawutt.b
* @since 2018/05/22 16:44:20
* @license PAKGON
* @return void
*/
public function signout() {
$http = new Client();
$result = $http->delete(Configure::read('OAUTH2_PROVIDER.TOKEN_DETETE') . '/' . $this->Auth->user('id'))->body();
$this->Flash->success(__('You are now logged out.'));
return $this->redirect($this->Auth->logout());
}
}
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