Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
simpmw
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
Alfiro Pratama
simpmw
Commits
5abb6d99
Commit
5abb6d99
authored
Mar 30, 2026
by
Alfiro Pratama
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix login trait reviewer
parent
056bb2e7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
4 deletions
+16
-4
app/Repositories/Auth/BiodataRepository.php
+1
-1
app/Traits/LoginTrait.php
+15
-3
No files found.
app/Repositories/Auth/BiodataRepository.php
View file @
5abb6d99
...
...
@@ -57,7 +57,7 @@ class BiodataRepository
// ubah novan karena ambil email dari isdm saja jangan dari auth;
// $data['email'] = $auth[0]->email;
// $data['noid'] = $isdm[0]->nip;
$data
[
'email'
]
=
$auth
[
0
]
->
email
;
$data
[
'email'
]
=
$auth
[
0
]
->
email
??
$isdm
[
0
]
->
email
;
$data
[
'name'
]
=
$isdm
[
0
]
->
nama
;
$data
[
'noid'
]
=
$isdm
[
0
]
->
nidn
??
$isdm
[
0
]
->
nuptk
;
if
(
$isdm
[
0
]
->
isdosen
==
0
)
{
...
...
app/Traits/LoginTrait.php
View file @
5abb6d99
...
...
@@ -42,14 +42,26 @@ trait LoginTrait
private
function
getAddReviewer
(
$nip
)
{
$id
=
(
string
)
Str
::
uuid
();
$data
=
collect
([
(
object
)
[
'jenis'
=>
'P'
,
'userid'
=>
$nip
]
'userid'
=>
$nip
,
]
,
]);
$biodata
=
$this
->
biodataRepo
->
biodata
(
$data
->
toArray
());
// User sudah terdaftar (mis. sebagai dosen) dengan email sama, tetapi noidentitas beda dengan NIDN yang dipakai di sini — hindari duplicate users.email
$email
=
isset
(
$biodata
[
'email'
])
?
trim
((
string
)
$biodata
[
'email'
])
:
''
;
if
(
$email
!==
''
)
{
$existingByEmail
=
$this
->
userRepo
->
find
(
null
,
null
,
$email
);
if
(
$existingByEmail
)
{
$this
->
createRole
(
$existingByEmail
->
id
);
return
'sukses'
;
}
}
$id
=
(
string
)
Str
::
uuid
();
$user
=
$this
->
userRepo
->
storeSso
(
$id
,
$biodata
);
$roles
=
$this
->
roleRepo
->
roles
(
'reviewer'
);
$this
->
userDetailRepo
->
storeSso
(
$user
->
id
,
$biodata
);
...
...
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