Skip to content

Commit

Permalink
MDL-38332 Users: Browse list of users should not contain guest user r…
Browse files Browse the repository at this point in the history
…ecord
  • Loading branch information
Rajesh Taneja committed Mar 8, 2013
1 parent 8673a98 commit 4e0b615
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
4 changes: 0 additions & 4 deletions admin/user.php
Original file line number Diff line number Diff line change
Expand Up @@ -279,10 +279,6 @@

$table->id = "users";
foreach ($users as $user) {
if (isguestuser($user)) {
continue; // do not display guest here
}

$buttons = array();
$lastcolumn = '';

Expand Down
6 changes: 3 additions & 3 deletions lib/datalib.php
Original file line number Diff line number Diff line change
Expand Up @@ -375,12 +375,12 @@ function get_users($get=true, $search='', $confirmed=false, array $exceptions=nu
function get_users_listing($sort='lastaccess', $dir='ASC', $page=0, $recordsperpage=0,
$search='', $firstinitial='', $lastinitial='', $extraselect='',
array $extraparams=null, $extracontext = null) {
global $DB;
global $DB, $CFG;

$fullname = $DB->sql_fullname();

$select = "deleted <> 1";
$params = array();
$select = "deleted <> 1 AND id <> :guestid";
$params = array('guestid' => $CFG->siteguest);

if (!empty($search)) {
$search = trim($search);
Expand Down

0 comments on commit 4e0b615

Please sign in to comment.