Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
smart_core_connect
/
core-connect
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
aff19396
authored
May 14, 2018
by
opal007
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'integration' into opal007
parents
9d892594
9765bb8e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
www/src/Controller/UserprofilesController.php
+6
-6
www/src/Template/UserProfiles/profile_setting.backup
+0
-0
www/src/Template/UserProfiles/profile_setting.ctp
+0
-0
No files found.
www/src/Controller/UserprofilesController.php
View file @
aff19396
...
@@ -105,7 +105,7 @@ class UserProfilesController extends AppController {
...
@@ -105,7 +105,7 @@ class UserProfilesController extends AppController {
if
(
$this
->
request
->
is
([
'patch'
,
'post'
,
'put'
]))
{
if
(
$this
->
request
->
is
([
'patch'
,
'post'
,
'put'
]))
{
// debug($this->request->data);
// debug($this->request->data);
// exit;
// exit;
$data
=
$this
->
request
->
data
;
#
pr($data);
$data
=
$this
->
request
->
data
;
//
pr($data);
list
(
$data
[
'UserPersonals'
][
'firstname_th'
],
$data
[
'UserPersonals'
][
'lastname_th'
])
=
explode
(
' '
,
$data
[
'UserPersonals'
][
'fullname'
]);
list
(
$data
[
'UserPersonals'
][
'firstname_th'
],
$data
[
'UserPersonals'
][
'lastname_th'
])
=
explode
(
' '
,
$data
[
'UserPersonals'
][
'fullname'
]);
unset
(
$data
[
'UserPersonals'
][
'fullname'
]);
unset
(
$data
[
'UserPersonals'
][
'fullname'
]);
$data
[
'UserPersonals'
][
'birthdate'
]
=
''
;
$data
[
'UserPersonals'
][
'birthdate'
]
=
''
;
...
@@ -117,8 +117,8 @@ class UserProfilesController extends AppController {
...
@@ -117,8 +117,8 @@ class UserProfilesController extends AppController {
$data
[
'UserProfiles'
][
1
][
'user_id'
]
=
$data
[
'Users'
][
'user_id'
];
$data
[
'UserProfiles'
][
1
][
'user_id'
]
=
$data
[
'Users'
][
'user_id'
];
$data
[
'UserProfiles'
][
1
][
'user_type_id'
]
=
2
;
$data
[
'UserProfiles'
][
1
][
'user_type_id'
]
=
2
;
$data
[
'UserProfiles'
][
1
][
'modified_by'
]
=
''
;
$data
[
'UserProfiles'
][
1
][
'modified_by'
]
=
''
;
debug
(
$data
);
//
debug($data);
exit
;
//
exit;
#$api_update_profile = 'http://connect06.pakgon.com/api/Connects/Profile/updateProfile';
#$api_update_profile = 'http://connect06.pakgon.com/api/Connects/Profile/updateProfile';
$api_update_profile
=
Configure
::
read
(
'Config.apiCore.profile'
)
.
'/updateProfile'
;
$api_update_profile
=
Configure
::
read
(
'Config.apiCore.profile'
)
.
'/updateProfile'
;
$http
=
new
Client
();
$http
=
new
Client
();
...
@@ -132,10 +132,10 @@ class UserProfilesController extends AppController {
...
@@ -132,10 +132,10 @@ class UserProfilesController extends AppController {
];
];
#prr($options);
#prr($options);
$response
=
$http
->
post
(
$api_update_profile
,
$data
,
$options
)
->
body
();
$response
=
$http
->
post
(
$api_update_profile
,
$data
,
$options
)
->
body
();
pr
(
$response
);
//
pr($response);
$response
=
json_decode
(
$response
,
'_full'
);
$response
=
json_decode
(
$response
,
'_full'
);
pr
(
$response
);
//
pr($response);
die
;
//
die;
}
}
// $organization = $this->UserProfiles->MasterOrganizations->find('list')->select(['MasterOrganizations.id', 'MasterOrganizations.org_name_th'])->where(['master_organization_type_id' => 1]);
// $organization = $this->UserProfiles->MasterOrganizations->find('list')->select(['MasterOrganizations.id', 'MasterOrganizations.org_name_th'])->where(['master_organization_type_id' => 1]);
...
...
www/src/Template/UserProfiles/profile_setting.backup
0 → 100644
View file @
aff19396
This diff is collapsed.
Click to expand it.
www/src/Template/UserProfiles/profile_setting.ctp
View file @
aff19396
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment