diff options
Diffstat (limited to 'mod')
-rw-r--r-- | mod/uservalidationbyemail/views/default/admin/users/unvalidated.php | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/mod/uservalidationbyemail/views/default/admin/users/unvalidated.php b/mod/uservalidationbyemail/views/default/admin/users/unvalidated.php index 0a274c1dc..279c7387f 100644 --- a/mod/uservalidationbyemail/views/default/admin/users/unvalidated.php +++ b/mod/uservalidationbyemail/views/default/admin/users/unvalidated.php @@ -6,22 +6,39 @@ * @subpackage UserValidationByEmail.Administration */ -// @todo pagination would be nice. +$limit = get_input('limit', 10); +$offset = get_input('offset', 0); + // can't use elgg_list_entities() and friends because we don't use the default view for users. $ia = elgg_set_ignore_access(TRUE); $hidden_entities = access_get_show_hidden_status(); access_show_hidden_entities(TRUE); -$users = elgg_get_entities_from_metadata(array( +$options = array( 'type' => 'user', 'metadata_name' => 'validated', 'metadata_value' => 0, - 'limit' => 9999, -)); + 'limit' => $limit, + 'offset' => $offset +); +$users = elgg_get_entities_from_metadata($options); + +$options['count'] = TRUE; +$count = elgg_get_entities_from_metadata($options); access_show_hidden_entities($hidden_entities); elgg_set_ignore_access($ia); +// setup pagination +$pagination = elgg_view('navigation/pagination', array( + 'baseurl' => $vars['url'] . 'pg/admin/users/unvalidated', + 'offset' => $offset, + 'count' => $count, + 'limit' => $limit, +)); + +echo $pagination; + if ($users) { foreach ($users as $user) { $form_body .= elgg_view('uservalidationbyemail/unvalidated_user', array('theuser' => $user)); |