assign admins page should respect MAX_USERS_PER_PAGE

This commit is contained in:
mjollnir_
2006-04-20 00:19:17 +00:00
parent f83edcb114
commit 60188cee2b
2 changed files with 22 additions and 9 deletions
+11 -4
View File
@@ -101,11 +101,18 @@
/// If no search results then get potential users excluding current admins
if (empty($searchusers)) {
if (!$users = get_users(true, '', true, $adminlist, 'firstname ASC, lastname ASC', '', '',
0, 99999, 'id, firstname, lastname, email') ) {
$users = array();
$usercount = get_users(false, '', true, $adminlist, 'firstname ASC, lastname ASC', '', '',
0, 99999, 'id, firstname, lastname, email');
$users = array();
if ($usercount <= MAX_USERS_PER_PAGE) {
if (!$users = get_users(true, '', true, $adminlist, 'firstname ASC, lastname ASC', '', '',
0, 99999, 'id, firstname, lastname, email') ) {
$users = array();
}
}
$usercount = count($users);
}
$searchtext = (isset($frm->searchtext)) ? $frm->searchtext : "";