FEAT #10619 TIME 0:10 code review variable name

parent 71093461
......@@ -317,7 +317,7 @@ class MaarchParapheurController
$userInfos = UserModel::getByExternalId([
'select' => ['firstname', 'lastname'],
'externalId' => $value['userId'],
'signatoryBookName' => 'maarchParapheur'
'externalName' => 'maarchParapheur'
]);
if ($value['mode'] == 'note') {
$mode = _NOTE_USER;
......@@ -394,7 +394,7 @@ class MaarchParapheurController
$userInfos = UserModel::getByExternalId([
'select' => ['user_id'],
'externalId' => $state['noteCreatorId'],
'signatoryBookName' => 'maarchParapheur'
'externalName' => 'maarchParapheur'
]);
if (!empty($userInfos)) {
$aArgs['idsToRetrieve'][$version][$resId]->noteCreatorId = $userInfos['user_id'];
......
......@@ -60,13 +60,13 @@ abstract class UserModelAbstract
public static function getByExternalId(array $aArgs)
{
ValidatorModel::notEmpty($aArgs, ['externalId', 'signatoryBookName']);
ValidatorModel::notEmpty($aArgs, ['externalId', 'externalName']);
ValidatorModel::intVal($aArgs, ['externalId']);
$aUser = DatabaseModel::select([
'select' => empty($aArgs['select']) ? ['*'] : $aArgs['select'],
'table' => ['users'],
'where' => ['external_id->>\''.$aArgs['signatoryBookName'].'\' = ?'],
'where' => ['external_id->>\''.$aArgs['externalName'].'\' = ?'],
'data' => [$aArgs['externalId']]
]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment