PMCORE-3951

This commit is contained in:
Luciana Nuñez
2022-08-26 12:42:07 -04:00
parent b58420638c
commit 7894191249
21 changed files with 25 additions and 44 deletions

View File

@@ -50,7 +50,7 @@ class PMFNewUserTest extends TestCase
public function it_should_test_the_pmfnewuser_function() public function it_should_test_the_pmfnewuser_function()
{ {
global $RBAC; global $RBAC;
$user = User::where('USR_ID', '=', 1)->get()->first(); $user = User::where('USR_ID', '=', 1)->first();
$_SESSION['USER_LOGGED'] = $user['USR_UID']; $_SESSION['USER_LOGGED'] = $user['USR_UID'];
$RBAC = RBAC::getSingleton(PATH_DATA, session_id()); $RBAC = RBAC::getSingleton(PATH_DATA, session_id());
$RBAC->initRBAC(); $RBAC->initRBAC();

View File

@@ -706,7 +706,7 @@ class ReportTablesTest extends TestCase
$proUid = $result->processUid; $proUid = $result->processUid;
$grid = ''; $grid = '';
$app = Application::where('APP_UID', '=', $result->applicationUid)->get()->first(); $app = Application::where('APP_UID', '=', $result->applicationUid)->first();
$appData = unserialize($app->APP_DATA); $appData = unserialize($app->APP_DATA);
unset($appData['var_Textarea1']); unset($appData['var_Textarea1']);
$appData = serialize($appData); $appData = serialize($appData);
@@ -742,7 +742,7 @@ class ReportTablesTest extends TestCase
$proUid = $result->processUid; $proUid = $result->processUid;
$grid = ''; $grid = '';
$app = Application::where('APP_UID', '=', $result->applicationUid)->get()->first(); $app = Application::where('APP_UID', '=', $result->applicationUid)->first();
$appData = unserialize($app->APP_DATA); $appData = unserialize($app->APP_DATA);
$appData['var_Textarea1'] = []; $appData['var_Textarea1'] = [];
$appData = serialize($appData); $appData = serialize($appData);
@@ -779,7 +779,7 @@ class ReportTablesTest extends TestCase
$proUid = $result->processUid; $proUid = $result->processUid;
$grid = 'var_Grid1'; $grid = 'var_Grid1';
$app = Application::where('APP_UID', '=', $result->applicationUid)->get()->first(); $app = Application::where('APP_UID', '=', $result->applicationUid)->first();
$appData = unserialize($app->APP_DATA); $appData = unserialize($app->APP_DATA);
unset($appData['var_Grid1'][1]['var_Textarea1']); unset($appData['var_Grid1'][1]['var_Textarea1']);
$appData = serialize($appData); $appData = serialize($appData);
@@ -897,7 +897,7 @@ class ReportTablesTest extends TestCase
$proUid = $result->processUid; $proUid = $result->processUid;
$grid = 'var_Grid1'; $grid = 'var_Grid1';
$app = Application::where('APP_UID', '=', $result->applicationUid)->get()->first(); $app = Application::where('APP_UID', '=', $result->applicationUid)->first();
$appData = unserialize($app->APP_DATA); $appData = unserialize($app->APP_DATA);
$appData['var_Textarea1'] = []; $appData['var_Textarea1'] = [];
$appData = serialize($appData); $appData = serialize($appData);

View File

@@ -1005,7 +1005,7 @@ class WsBaseTest extends TestCase
{ {
// Definition for avoid the error: Trying to get property 'aUserInfo' of non-object in the action buildAppDelayRow() // Definition for avoid the error: Trying to get property 'aUserInfo' of non-object in the action buildAppDelayRow()
global $RBAC; global $RBAC;
$user = User::where('USR_ID', '=', 1)->get()->first(); $user = User::where('USR_ID', '=', 1)->first();
$_SESSION['USER_LOGGED'] = $user['USR_UID']; $_SESSION['USER_LOGGED'] = $user['USR_UID'];
$RBAC = RBAC::getSingleton(PATH_DATA, session_id()); $RBAC = RBAC::getSingleton(PATH_DATA, session_id());
$RBAC->initRBAC(); $RBAC->initRBAC();
@@ -1067,7 +1067,7 @@ class WsBaseTest extends TestCase
{ {
// Definition for avoid the error: Trying to get property 'aUserInfo' of non-object in the action buildAppDelayRow() // Definition for avoid the error: Trying to get property 'aUserInfo' of non-object in the action buildAppDelayRow()
global $RBAC; global $RBAC;
$user = User::where('USR_ID', '=', 1)->get()->first(); $user = User::where('USR_ID', '=', 1)->first();
$_SESSION['USER_LOGGED'] = $user['USR_UID']; $_SESSION['USER_LOGGED'] = $user['USR_UID'];
$RBAC = RBAC::getSingleton(PATH_DATA, session_id()); $RBAC = RBAC::getSingleton(PATH_DATA, session_id());
$RBAC->initRBAC(); $RBAC->initRBAC();

View File

@@ -139,7 +139,6 @@ class AppNotesTest extends TestCase
public function it_should_test_send_note_notification_without_user() public function it_should_test_send_note_notification_without_user()
{ {
$user = User::where('USR_UID', '=', '00000000000000000000000000000001') $user = User::where('USR_UID', '=', '00000000000000000000000000000001')
->get()
->first(); ->first();
$application = factory(Application::class)->create(); $application = factory(Application::class)->create();
$delegation = factory(Delegation::class)->create([ $delegation = factory(Delegation::class)->create([
@@ -159,7 +158,7 @@ class AppNotesTest extends TestCase
$appNotes->sendNoteNotification(...$params); $appNotes->sendNoteNotification(...$params);
//assert //assert
$appMessage = AppMessage::where('APP_UID', '=', $application->APP_UID)->get()->first()->toArray(); $appMessage = AppMessage::where('APP_UID', '=', $application->APP_UID)->first()->toArray();
$this->assertArrayHasKey('APP_UID', $appMessage); $this->assertArrayHasKey('APP_UID', $appMessage);
$this->assertEquals($appMessage['APP_UID'], $application->APP_UID); $this->assertEquals($appMessage['APP_UID'], $application->APP_UID);
} }
@@ -172,7 +171,6 @@ class AppNotesTest extends TestCase
public function it_should_test_send_note_notification_with_attach_files() public function it_should_test_send_note_notification_with_attach_files()
{ {
$user = User::where('USR_UID', '=', '00000000000000000000000000000001') $user = User::where('USR_UID', '=', '00000000000000000000000000000001')
->get()
->first(); ->first();
$application = factory(Application::class)->create(); $application = factory(Application::class)->create();
$delegation = factory(Delegation::class)->create([ $delegation = factory(Delegation::class)->create([
@@ -200,7 +198,7 @@ class AppNotesTest extends TestCase
$appNotes->sendNoteNotification(...$params); $appNotes->sendNoteNotification(...$params);
//assert //assert
$appMessage = AppMessage::where('APP_UID', '=', $application->APP_UID)->get()->first()->toArray(); $appMessage = AppMessage::where('APP_UID', '=', $application->APP_UID)->first()->toArray();
$this->assertArrayHasKey('APP_UID', $appMessage); $this->assertArrayHasKey('APP_UID', $appMessage);
$this->assertEquals($appMessage['APP_UID'], $application->APP_UID); $this->assertEquals($appMessage['APP_UID'], $application->APP_UID);
} }

View File

@@ -35,7 +35,7 @@ class CasesMenuHighlightTest extends TestCase
{ {
global $RBAC; global $RBAC;
$this->user = User::where('USR_ID', '=', 1)->get()->first(); $this->user = User::where('USR_ID', '=', 1)->first();
$_SESSION['USER_LOGGED'] = $this->user['USR_UID']; $_SESSION['USER_LOGGED'] = $this->user['USR_UID'];

View File

@@ -61,7 +61,7 @@ class EmailServerTest extends TestCase
private function loadUserSession() private function loadUserSession()
{ {
global $RBAC; global $RBAC;
$user = User::where('USR_ID', '=', 1)->get()->first(); $user = User::where('USR_ID', '=', 1)->first();
$_SESSION['USER_LOGGED'] = $user['USR_UID']; $_SESSION['USER_LOGGED'] = $user['USR_UID'];
$RBAC = RBAC::getSingleton(PATH_DATA, session_id()); $RBAC = RBAC::getSingleton(PATH_DATA, session_id());
$RBAC->initRBAC(); $RBAC->initRBAC();

View File

@@ -41,7 +41,7 @@ class CasesTraitTest extends TestCase
*/ */
private function prepareDerivationData() private function prepareDerivationData()
{ {
$user = User::where('USR_ID', '=', 1)->get()->first(); $user = User::where('USR_ID', '=', 1)->first();
$process = factory(Process::class)->create([ $process = factory(Process::class)->create([
'PRO_CREATE_USER' => $user->USR_UID 'PRO_CREATE_USER' => $user->USR_UID
@@ -176,7 +176,7 @@ class CasesTraitTest extends TestCase
$cases = new Cases(); $cases = new Cases();
$cases->routeCase($processUid, $application, $postForm, $status, $flagGmail, $tasUid, $index, $userLogged); $cases->routeCase($processUid, $application, $postForm, $status, $flagGmail, $tasUid, $index, $userLogged);
$result = Delegation::where('APP_UID', '=', $application)->where('DEL_INDEX', '=', $index)->get()->first(); $result = Delegation::where('APP_UID', '=', $application)->where('DEL_INDEX', '=', $index)->first();
$this->assertEquals('CLOSED', $result->DEL_THREAD_STATUS); $this->assertEquals('CLOSED', $result->DEL_THREAD_STATUS);
} }
@@ -231,7 +231,7 @@ class CasesTraitTest extends TestCase
$cases = new Cases(); $cases = new Cases();
$cases->routeCase($processUid, $appUid, $postForm, $status, $flagGmail, $tasUid, $index, $userLogged); $cases->routeCase($processUid, $appUid, $postForm, $status, $flagGmail, $tasUid, $index, $userLogged);
$result = Delegation::where('APP_UID', '=', $appUid)->where('DEL_INDEX', '=', $index)->get()->first(); $result = Delegation::where('APP_UID', '=', $appUid)->where('DEL_INDEX', '=', $index)->first();
$this->assertEquals('CLOSED', $result->DEL_THREAD_STATUS); $this->assertEquals('CLOSED', $result->DEL_THREAD_STATUS);
} }
@@ -302,7 +302,7 @@ class CasesTraitTest extends TestCase
*/ */
public function it_should_verify_if_abe_is_completed() public function it_should_verify_if_abe_is_completed()
{ {
$user = User::where('USR_ID', '=', 1)->get()->first(); $user = User::where('USR_ID', '=', 1)->first();
$process = factory(Process::class)->create([ $process = factory(Process::class)->create([
'PRO_CREATE_USER' => $user->USR_UID 'PRO_CREATE_USER' => $user->USR_UID

View File

@@ -147,7 +147,7 @@ class GmailOAuthTest extends TestCase
public function it_should_create_email_server() public function it_should_create_email_server()
{ {
global $RBAC; global $RBAC;
$user = User::where('USR_ID', '=', 1)->get()->first(); $user = User::where('USR_ID', '=', 1)->first();
$_SESSION['USER_LOGGED'] = $user['USR_UID']; $_SESSION['USER_LOGGED'] = $user['USR_UID'];
$RBAC = RBAC::getSingleton(PATH_DATA, session_id()); $RBAC = RBAC::getSingleton(PATH_DATA, session_id());
$RBAC->initRBAC(); $RBAC->initRBAC();

View File

@@ -42,7 +42,7 @@ class ServerTest extends TestCase
*/ */
public function it_should_test_post_token_with_valid_credentials() public function it_should_test_post_token_with_valid_credentials()
{ {
$user = User::where('USR_ID', '=', 1)->get()->first(); $user = User::where('USR_ID', '=', 1)->first();
$oauthClients = factory(OauthClients::class)->create([ $oauthClients = factory(OauthClients::class)->create([
"USR_UID" => $user->USR_UID "USR_UID" => $user->USR_UID
]); ]);
@@ -80,7 +80,7 @@ class ServerTest extends TestCase
*/ */
public function it_should_test_post_token_with_return_handle_token() public function it_should_test_post_token_with_return_handle_token()
{ {
$user = User::where('USR_ID', '=', 1)->get()->first(); $user = User::where('USR_ID', '=', 1)->first();
$oauthClients = factory(OauthClients::class)->create([ $oauthClients = factory(OauthClients::class)->create([
"USR_UID" => $user->USR_UID "USR_UID" => $user->USR_UID
]); ]);
@@ -116,7 +116,7 @@ class ServerTest extends TestCase
*/ */
public function it_should_test_post_token_with_empty_client_id() public function it_should_test_post_token_with_empty_client_id()
{ {
$user = User::where('USR_ID', '=', 1)->get()->first(); $user = User::where('USR_ID', '=', 1)->first();
$oauthClients = factory(OauthClients::class)->create([ $oauthClients = factory(OauthClients::class)->create([
"USR_UID" => $user->USR_UID "USR_UID" => $user->USR_UID
]); ]);
@@ -155,8 +155,8 @@ class ServerTest extends TestCase
*/ */
public function it_should_test_post_token_for_pm_client_id() public function it_should_test_post_token_for_pm_client_id()
{ {
$user = User::where('USR_ID', '=', 1)->get()->first(); $user = User::where('USR_ID', '=', 1)->first();
$oauthClients = OauthClients::where('CLIENT_ID', '=', 'x-pm-local-client')->get()->first(); $oauthClients = OauthClients::where('CLIENT_ID', '=', 'x-pm-local-client')->first();
$data = '{ $data = '{
"grant_type":"password", "grant_type":"password",

View File

@@ -2561,7 +2561,6 @@ class LdapAdvanced
->where('GRP_STATUS', '=', 'ACTIVE') ->where('GRP_STATUS', '=', 'ACTIVE')
->where('GRP_TITLE', '=', $title) ->where('GRP_TITLE', '=', $title)
->orderBy('GRP_ID', 'ASC') ->orderBy('GRP_ID', 'ASC')
->get()
->first(); ->first();
if (!empty($groupWf)) { if (!empty($groupWf)) {
return $groupWf->GRP_UID; return $groupWf->GRP_UID;

View File

@@ -104,7 +104,6 @@ switch ($function) {
$authenticationSource = RbacAuthenticationSource::query() $authenticationSource = RbacAuthenticationSource::query()
->select(['AUTH_SOURCE_UID', 'AUTH_SOURCE_NAME']) ->select(['AUTH_SOURCE_UID', 'AUTH_SOURCE_NAME'])
->where('AUTH_SOURCE_NAME', '=', $authSourceName) ->where('AUTH_SOURCE_NAME', '=', $authSourceName)
->get()
->first(); ->first();
$row = false; $row = false;
$suggestName = ""; $suggestName = "";
@@ -114,7 +113,6 @@ switch ($function) {
->select(['AUTH_SOURCE_NAME']) ->select(['AUTH_SOURCE_NAME'])
->where('AUTH_SOURCE_NAME', 'LIKE', "%{$authSourceName}%") ->where('AUTH_SOURCE_NAME', 'LIKE', "%{$authSourceName}%")
->orderBy('AUTH_SOURCE_NAME', 'desc') ->orderBy('AUTH_SOURCE_NAME', 'desc')
->get()
->first(); ->first();
if (!empty($lastAuthenticationSource)) { if (!empty($lastAuthenticationSource)) {
$name = $lastAuthenticationSource->AUTH_SOURCE_NAME; $name = $lastAuthenticationSource->AUTH_SOURCE_NAME;

View File

@@ -162,7 +162,6 @@ try {
$dateCreate = empty($_REQUEST["UEA_DATE_CREATE"]) ? date("Y-m-d H:i:s") : $_REQUEST["UEA_DATE_CREATE"]; $dateCreate = empty($_REQUEST["UEA_DATE_CREATE"]) ? date("Y-m-d H:i:s") : $_REQUEST["UEA_DATE_CREATE"];
$userExtendedAttributes = UserExtendedAttributes::where('UEA_ID', '=', $id) $userExtendedAttributes = UserExtendedAttributes::where('UEA_ID', '=', $id)
->get()
->first(); ->first();
if (empty($userExtendedAttributes)) { if (empty($userExtendedAttributes)) {
$userExtendedAttributes = new UserExtendedAttributes(); $userExtendedAttributes = new UserExtendedAttributes();
@@ -194,7 +193,6 @@ try {
$userExtendedAttributes = UserExtendedAttributes::query() $userExtendedAttributes = UserExtendedAttributes::query()
->where('UEA_NAME', '=', trim($name)) ->where('UEA_NAME', '=', trim($name))
->where('UEA_ID', '<>', $id) ->where('UEA_ID', '<>', $id)
->get()
->first(); ->first();
$result = [ $result = [
"valid" => empty($userExtendedAttributes), "valid" => empty($userExtendedAttributes),
@@ -208,7 +206,6 @@ try {
$userExtendedAttributes = UserExtendedAttributes::query() $userExtendedAttributes = UserExtendedAttributes::query()
->where('UEA_ATTRIBUTE_ID', '=', trim($attributeId)) ->where('UEA_ATTRIBUTE_ID', '=', trim($attributeId))
->where('UEA_ID', '<>', $id) ->where('UEA_ID', '<>', $id)
->get()
->first(); ->first();
$result = [ $result = [
"valid" => empty($userExtendedAttributes), "valid" => empty($userExtendedAttributes),
@@ -221,7 +218,6 @@ try {
$attributeId = empty($_REQUEST["attributeId"]) ? "" : $_REQUEST["attributeId"]; $attributeId = empty($_REQUEST["attributeId"]) ? "" : $_REQUEST["attributeId"];
$user = User::query() $user = User::query()
->where("USR_EXTENDED_ATTRIBUTES_DATA", "LIKE", "%\"{$attributeId}\"%") ->where("USR_EXTENDED_ATTRIBUTES_DATA", "LIKE", "%\"{$attributeId}\"%")
->get()
->first(); ->first();
$isUsed = false; $isUsed = false;
$message = ""; $message = "";

View File

@@ -308,7 +308,6 @@ class Home
->where('CAL_ID', '=', $id) ->where('CAL_ID', '=', $id)
->join('ADDITIONAL_TABLES', 'ADDITIONAL_TABLES.ADD_TAB_UID', '=', 'CASE_LIST.ADD_TAB_UID') ->join('ADDITIONAL_TABLES', 'ADDITIONAL_TABLES.ADD_TAB_UID', '=', 'CASE_LIST.ADD_TAB_UID')
->join('PROCESS', 'PROCESS.PRO_UID', '=', 'ADDITIONAL_TABLES.PRO_UID') ->join('PROCESS', 'PROCESS.PRO_UID', '=', 'ADDITIONAL_TABLES.PRO_UID')
->get()
->first(); ->first();
if (!empty($caseList)) { if (!empty($caseList)) {
$tableName = $caseList->ADD_TAB_NAME; $tableName = $caseList->ADD_TAB_NAME;

View File

@@ -350,7 +350,6 @@ class TaskSchedulerBM
$scheduler = TaskScheduler::select() $scheduler = TaskScheduler::select()
->where('title', '=', $service['title']) ->where('title', '=', $service['title'])
->where('description', '=', $service['description']) ->where('description', '=', $service['description'])
->get()
->first(); ->first();
if (is_null($scheduler)) { if (is_null($scheduler)) {
self::registerScheduledTask($service); self::registerScheduledTask($service);

View File

@@ -1154,7 +1154,6 @@ class WebEntry
$result = true; $result = true;
$webentry = WebEntryModel::select('WE_HIDE_ACTIVE_SESSION_WARNING', 'WE_AUTHENTICATION') $webentry = WebEntryModel::select('WE_HIDE_ACTIVE_SESSION_WARNING', 'WE_AUTHENTICATION')
->where('WE_UID', '=', $weUid) ->where('WE_UID', '=', $weUid)
->get()
->first(); ->first();
if ($webentry->WE_AUTHENTICATION === 'LOGIN_REQUIRED') { if ($webentry->WE_AUTHENTICATION === 'LOGIN_REQUIRED') {
$result = intval($webentry->WE_HIDE_ACTIVE_SESSION_WARNING) === 0; $result = intval($webentry->WE_HIDE_ACTIVE_SESSION_WARNING) === 0;

View File

@@ -93,7 +93,6 @@ class CaseList extends Model
'ADDITIONAL_TABLES.ADD_TAB_NAME', 'ADDITIONAL_TABLES.ADD_TAB_NAME',
'ADDITIONAL_TABLES.PRO_UID' 'ADDITIONAL_TABLES.PRO_UID'
]) ])
->get()
->first(); ->first();
return $caseList; return $caseList;
@@ -174,7 +173,7 @@ class CaseList extends Model
$caseList = CaseList::where('CAL_ID', '=', $id); $caseList = CaseList::where('CAL_ID', '=', $id);
$caseList->update($attributes); $caseList->update($attributes);
$model = $caseList->get()->first(); $model = $caseList->first();
if (!is_null($model)) { if (!is_null($model)) {
$model->CAL_COLUMNS = json_decode($model->CAL_COLUMNS); $model->CAL_COLUMNS = json_decode($model->CAL_COLUMNS);
} }
@@ -189,7 +188,7 @@ class CaseList extends Model
public static function deleteSetting(int $id) public static function deleteSetting(int $id)
{ {
$caseList = CaseList::where('CAL_ID', '=', $id); $caseList = CaseList::where('CAL_ID', '=', $id);
$model = $caseList->get()->first(); $model = $caseList->first();
if (!is_null($model)) { if (!is_null($model)) {
$caseList->delete(); $caseList->delete();
$model->CAL_COLUMNS = json_decode($model->CAL_COLUMNS); $model->CAL_COLUMNS = json_decode($model->CAL_COLUMNS);
@@ -274,7 +273,6 @@ class CaseList extends Model
'CASE_LIST.*', 'CASE_LIST.*',
'ADDITIONAL_TABLES.ADD_TAB_NAME' 'ADDITIONAL_TABLES.ADD_TAB_NAME'
]) ])
->get()
->first(); ->first();
if (empty($model)) { if (empty($model)) {
throw new Exception(G::LoadTranslation('ID_DOES_NOT_EXIST')); throw new Exception(G::LoadTranslation('ID_DOES_NOT_EXIST'));
@@ -322,7 +320,6 @@ class CaseList extends Model
//the pmtable not exist //the pmtable not exist
$table = AdditionalTables::where('ADD_TAB_NAME', '=', $tableName) $table = AdditionalTables::where('ADD_TAB_NAME', '=', $tableName)
->get()
->first(); ->first();
if ($table === null) { if ($table === null) {
return [ return [
@@ -352,7 +349,6 @@ class CaseList extends Model
//the name of the case list already exist //the name of the case list already exist
$list = CaseList::where('CAL_NAME', '=', $array['name']) $list = CaseList::where('CAL_NAME', '=', $array['name'])
->get()
->first(); ->first();
$requestData['duplicateName'] = $requestData['duplicateName'] ?? ''; $requestData['duplicateName'] = $requestData['duplicateName'] ?? '';
if ($requestData['duplicateName'] !== 'continue') { if ($requestData['duplicateName'] !== 'continue') {

View File

@@ -67,6 +67,6 @@ class Groupwf extends Model
public static function getGroupId($grpUid) public static function getGroupId($grpUid)
{ {
$query = Groupwf::select('GRP_ID')->where('GRP_UID', $grpUid); $query = Groupwf::select('GRP_ID')->where('GRP_UID', $grpUid);
return $query->get()->first()->toArray(); return $query->first()->toArray();
} }
} }

View File

@@ -495,7 +495,6 @@ class Process extends Model
$process = Process::query() $process = Process::query()
->where($key, $proId) ->where($key, $proId)
->where('PRO_STATUS', 'ACTIVE') ->where('PRO_STATUS', 'ACTIVE')
->get()
->first(); ->first();
return !empty($process); return !empty($process);
} }

View File

@@ -19,7 +19,7 @@ class RbacRoles extends Model
public static function getRolUidByCode($rolCode) public static function getRolUidByCode($rolCode)
{ {
$query = RbacRoles::select('ROL_UID')->where('ROL_CODE', $rolCode); $query = RbacRoles::select('ROL_UID')->where('ROL_CODE', $rolCode);
$query = $query->get()->first(); $query = $query->first();
if (is_null($query)) { if (is_null($query)) {
return []; return [];

View File

@@ -18,7 +18,6 @@ class Step extends Model
->where('TAS_UID', '=', $tasUid) ->where('TAS_UID', '=', $tasUid)
->where('STEP_TYPE_OBJ', '=', $stepTypeObj) ->where('STEP_TYPE_OBJ', '=', $stepTypeObj)
->where('STEP_UID_OBJ', '=', $stepUidObj) ->where('STEP_UID_OBJ', '=', $stepUidObj)
->get()
->first(); ->first();
return $step; return $step;
} }

View File

@@ -29,7 +29,6 @@ class UserConfig extends Model
{ {
$userConfig = UserConfig::where('USR_ID', '=', $id) $userConfig = UserConfig::where('USR_ID', '=', $id)
->where('USC_NAME', '=', $name) ->where('USC_NAME', '=', $name)
->get()
->first(); ->first();
if (empty($userConfig)) { if (empty($userConfig)) {
return null; return null;