Permalink
Browse files

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

…dle into MOODLE_23_STABLE
  • Loading branch information...
stronk7 committed Mar 12, 2013
2 parents c6f2415 + 8256fae commit cf6fdbd1b070913f4622e5d8cb8762f8f4b66e13
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 cf6fdbd

Please sign in to comment.