agent login issue : GWM
This commit is contained in:
parent
0b626d6297
commit
8586d6555a
@ -131,7 +131,8 @@ class AuthController extends ResourceController
|
|||||||
? null
|
? null
|
||||||
: date('d, M-Y h:iA', strtotime($lastLoginBeforeUpdate));
|
: date('d, M-Y h:iA', strtotime($lastLoginBeforeUpdate));
|
||||||
|
|
||||||
|
if($user['role_id'] != 5)
|
||||||
|
{
|
||||||
|
|
||||||
//get service for the organization
|
//get service for the organization
|
||||||
$orgService = $this->organizationModel->find($user['org_id']);
|
$orgService = $this->organizationModel->find($user['org_id']);
|
||||||
@ -150,6 +151,22 @@ class AuthController extends ResourceController
|
|||||||
//find user has the all access
|
//find user has the all access
|
||||||
$user['plan_action'] = getUserPlanCreationRestrictionStatus($user);
|
$user['plan_action'] = getUserPlanCreationRestrictionStatus($user);
|
||||||
|
|
||||||
|
}else{
|
||||||
|
|
||||||
|
$user['service'] = json_decode($user['agent_supported_service_ids'],true);
|
||||||
|
foreach ($user['service'] as $key => $value)
|
||||||
|
{
|
||||||
|
$serviceData = $this->serviceModel->find($value['service_id']);
|
||||||
|
$user['service'][$key]['name'] = $serviceData['name'];
|
||||||
|
$user['service'][$key]['icon'] = $serviceData['icon'];
|
||||||
|
$user['service'][$key]['order'] = $serviceData['order'];
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Generate JWT Token
|
// Generate JWT Token
|
||||||
$token = generateJWT($user);
|
$token = generateJWT($user);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user