update
parent
94866e806a
commit
53b4723c5c
|
|
@ -36,14 +36,14 @@ class CustomLoginController extends Controller
|
|||
if ($user && Hash::check($credentials['password'], $user->password)) {
|
||||
// dd($user->group);
|
||||
Auth::attempt(['username' => $request->email, 'password' => $request->password]);
|
||||
$instansi = @UserInstansi::where('user_id',$user->id)->first();
|
||||
$instansi = UserInstansi::where('user_id',$user->id)->first();
|
||||
$session = [
|
||||
'username' => $user->username,
|
||||
'name' => $user->name,
|
||||
'email' => $user->email,
|
||||
'currYear' => date('Y'),
|
||||
'group_id' => @$user->ms_group_id,
|
||||
'instansi_id' => $instansi->ms_instansi_id,
|
||||
'instansi_id' => @$instansi->ms_instansi_id,
|
||||
'resource_data' => @$instansi->instansi->resource_data,
|
||||
'group_alias' => @$user->group->alias,
|
||||
'group_name' => @$user->group->name,
|
||||
|
|
@ -66,7 +66,7 @@ class CustomLoginController extends Controller
|
|||
}else{
|
||||
if ($user && Hash::check($credentials['password'], $user->password)) {
|
||||
Auth::attempt(['email' => $request->email, 'password' => $request->password]);
|
||||
$instansi = @UserInstansi::where('user_id',$user->id)->first();
|
||||
$instansi = UserInstansi::where('user_id',$user->id)->first();
|
||||
$session = [
|
||||
'username' => $user->username,
|
||||
'name' => $user->name,
|
||||
|
|
|
|||
Loading…
Reference in New Issue