Merged in bugfix/HOR-3582 (pull request #5821)

HOR-3582

Approved-by: Julio Cesar Laura Avendaño <contact@julio-laura.com>
This commit is contained in:
jonathan Quispe
2017-07-27 20:03:50 +00:00
committed by Julio Cesar Laura Avendaño
2 changed files with 3 additions and 4 deletions

View File

@@ -318,8 +318,8 @@ try {
//Get all list of users with the additional information related to department, role, authentication, cases
$oUser = new \ProcessMaker\BusinessModel\User();
$oDatasetUsers = $oUser->getAllUsersWithAuthSource($authSource, $filter, $sort, $start, $limit, $dir);
$rows = $oUser->getAdditionalInfoFromUsers($oDatasetUsers);
echo '{users: ' . G::json_encode($rows['data']) . ', total_users: ' . $rows['totalCount'] . '}';
$rows = $oUser->getAdditionalInfoFromUsers($oDatasetUsers["data"]);
echo '{users: ' . G::json_encode($rows['data']) . ', total_users: ' . $oDatasetUsers["totalRows"] . '}';
break;
case 'updatePageSize':
G::LoadClass('configuration');

View File

@@ -1631,8 +1631,7 @@ class User
$oCriteria->setLimit($limit);
$oDataset = \UsersPeer::DoSelectRs($oCriteria);
$oDataset->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
return $oDataset;
return array("data" => $oDataset, "totalRows" => $totalRows);
}
/**
* This function get additional information related to the user