Fix limit en PM USER

This commit is contained in:
Freddy Daniel Rojas Valda
2014-02-13 15:56:26 -04:00
parent f2c105d528
commit 5a8d9b837d
2 changed files with 5 additions and 5 deletions

View File

@@ -661,17 +661,17 @@ class User
if ($start < 0) { if ($start < 0) {
throw (new \Exception( 'invalid value specified for `start`.')); throw (new \Exception( 'invalid value specified for `start`.'));
} else { } else {
$oCriteria->setOffset( $start ); $oCriteria->setOffset($start);
} }
} }
if (isset($limit)) { if ($limit != '') {
if ($limit < 0) { if ($limit < 0) {
throw (new \Exception( 'invalid value specified for `limit`.')); throw (new \Exception( 'invalid value specified for `limit`.'));
} else { } else {
if ($limit == 0) { if ($limit == 0) {
return $aUsers; return $aUserInfo;
} else { } else {
$oCriteria->setLimit( $limit ); $oCriteria->setLimit($limit);
} }
} }
} }

View File

@@ -18,7 +18,7 @@ class User extends Api
{ {
try { try {
$user = new \BusinessModel\User(); $user = new \BusinessModel\User();
$response = $user->getUsers($filter, null, null, $start, $limit); $response = $user->getUsers($filter, $start, $limit);
return $response; return $response;
} catch (\Exception $e) { } catch (\Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage())); throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));