Permalink
Browse files

Merge branch 'wip-mdl-38332-m24' of git://github.com/rajeshtaneja/moo…

…dle into MOODLE_24_STABLE
  • Loading branch information...
2 parents 2b2d324 + 58c8b68 commit b3a5ae03d06a5b9bcc8347c1d3cd28572db59f05 @stronk7 stronk7 committed Mar 12, 2013
Showing with 11 additions and 2 deletions.
  1. +11 −2 admin/user.php
View
@@ -196,11 +196,20 @@
}
list($extrasql, $params) = $ufiltering->get_sql_filter();
- $users = get_users_listing($sort, $dir, $page*$perpage, $perpage, '', '', '',
- $extrasql, $params, $context);
+
$usercount = get_users(false);
$usersearchcount = get_users(false, '', false, null, "", '', '', '', '', '*', $extrasql, $params);
+ // Exclude guest user from list.
+ $noguestsql = '';
+ if (!empty($extrasql)) {
+ $noguestsql .= ' AND';
+ }
+ $noguestsql .= " id <> :guestid";
+ $params['guestid'] = $CFG->siteguest;
+ $users = get_users_listing($sort, $dir, $page*$perpage, $perpage, '', '', '',
+ $extrasql.$noguestsql, $params, $context);
+
if ($extrasql !== '') {
echo $OUTPUT->heading("$usersearchcount / $usercount ".get_string('users'));
$usercount = $usersearchcount;

0 comments on commit b3a5ae0

Please sign in to comment.