Skip to content

Commit

Permalink
accesslib: get_user_by_capability() - Fix pagination
Browse files Browse the repository at this point in the history
Ooops! Off-by-one error

MDL-12452
  • Loading branch information
martinlanghoff committed Jan 6, 2008
1 parent c26ecb1 commit f17a660
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/accesslib.php
Expand Up @@ -4526,7 +4526,7 @@ function get_users_by_capability($context, $capability, $fields='', $sort='',
}

// Did we hit pagination limit?
if ($limitnum !==0 && $c > ($limitfrom+$limitnum)) { // we are done!
if ($limitnum !==0 && $c >= ($limitfrom+$limitnum)) { // we are done!
break;
}

Expand Down

0 comments on commit f17a660

Please sign in to comment.