Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
simpkm
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Farendi Giotivano R.P
simpkm
Commits
6b7939a6
Commit
6b7939a6
authored
Feb 24, 2023
by
novanbagus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update email dosen
parent
86ed1358
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
1 deletions
+22
-1
app/Repositories/Auth/BiodataRepository.php
+22
-1
No files found.
app/Repositories/Auth/BiodataRepository.php
View file @
6b7939a6
...
...
@@ -33,10 +33,31 @@ class BiodataRepository
$apiRequest
=
$client
->
request
(
'GET'
,
'https://i-sdm.unesa.ac.id/biodataumum/'
.
trim
(
$auth
[
0
]
->
userid
));
$isdm
=
json_decode
(
$apiRequest
->
getBody
()
->
getContents
());
if
(
$isdm
[
0
]
->
email
==
null
||
$isdm
[
0
]
->
email
==
''
)
{
$url
=
"https://i-sdm.unesa.ac.id/api/email/update/"
;
$token
=
'964cXM2eJmJVGLsj8x3M6gMi9kislGgobrbmzo6880m1mRRc9CLdW9v3Fh7VaLM0'
;
$headers
=
[
"Authorization"
=>
"Bearer "
.
$token
,
"Accept"
=>
"application/json"
,
];
$api_call
=
$client
->
request
(
'POST'
,
$url
,[
'headers'
=>
$headers
,
'form_params'
=>
[
'nip'
=>
$isdm
[
0
]
->
nip
,
'email'
=>
$auth
[
0
]
->
email
]
]);
$call_data
=
json_decode
(
$api_call
->
getBody
()
->
getContents
());
}
// ubah novan karena ambil email dari isdm saja jangan dari auth;
// $data['email'] = $auth[0]->email;
// $data['noid'] = $isdm[0]->nip;
$data
[
'email'
]
=
$
isdm
[
0
]
->
email
;
$data
[
'email'
]
=
$
auth
[
0
]
->
email
;
$data
[
'name'
]
=
$isdm
[
0
]
->
nama
;
$data
[
'noid'
]
=
$isdm
[
0
]
->
nidn
;
if
(
$isdm
[
0
]
->
isdosen
==
0
)
{
...
...
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