content.php 497 B

1234567891011121314151617181920212223
  1. <?php
  2. /**
  3. * Banned users admin widget
  4. */
  5. $num_display = sanitize_int($vars['entity']->num_display, false);
  6. // set default value for display number
  7. if (!$num_display) {
  8. $num_display = 5;
  9. }
  10. $db_prefix = elgg_get_config('dbprefix');
  11. echo elgg_list_entities(array(
  12. 'type' => 'user',
  13. 'subtype'=> null,
  14. 'wheres' => array("ue.banned = 'yes'"),
  15. 'joins' => array("JOIN {$db_prefix}users_entity ue on ue.guid = e.guid"),
  16. 'full_view' => false,
  17. 'pagination' => false,
  18. 'limit' => $num_display
  19. ));