From 38cb976c80e8819c0ee215fd5df7862dc021b5e9 Mon Sep 17 00:00:00 2001
From: moodler <moodler>
Date: Tue, 2 Oct 2007 09:45:00 +0000
Subject: [PATCH] Removing un-needed DISTINCT here actually solves MDL-11546

(after discussion with Martin Langhoff in Skype)
---
 user/index.php | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/user/index.php b/user/index.php
index c637b8422e..dc2da43b30 100644
--- a/user/index.php
+++ b/user/index.php
@@ -340,13 +340,12 @@
                       ctx.depth AS ctxdepth, ctx.contextlevel AS ctxlevel ';    
         $select .= $course->enrolperiod?', r.timeend ':'';
     } else {
-        $select = 'SELECT DISTINCT u.id, u.username, u.firstname, u.lastname,
+        $select = 'SELECT u.id, u.username, u.firstname, u.lastname,
                       u.email, u.city, u.country, u.picture,
                       u.lang, u.timezone, u.emailstop, u.maildisplay, u.imagealt,
                       u.lastaccess,
                       ctx.id AS ctxid, ctx.path AS ctxpath,
                       ctx.depth AS ctxdepth, ctx.contextlevel AS ctxlevel ';
-     
     }
 
     if ($context->id != $frontpagectx->id) {
-- 
2.39.5