Fix limit en PM USER
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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()));
|
||||||
|
|||||||
Reference in New Issue
Block a user