]> git.mjollnir.org Git - moodle.git/commitdiff
Modified function get_users_listing to:
authorselliott <selliott>
Tue, 9 Mar 2004 21:12:54 +0000 (21:12 +0000)
committerselliott <selliott>
Tue, 9 Mar 2004 21:12:54 +0000 (21:12 +0000)
1. also return confirmed field from user table and
2. include users in dataset who have not confirmed
(Used to display unconfirmed users in admin/user.php)

lib/datalib.php

index e9a157af7c0db4b030353a3dc52aa7d6afc0896c..339540d2e424db711e4afc061323b3b48a0ddbb5 100644 (file)
@@ -1404,10 +1404,11 @@ function get_users_listing($sort, $dir="ASC", $page=1, $recordsperpage=20, $sear
         $search = " AND ($fullname $LIKE '%$search%' OR email $LIKE '%$search%') ";
     }
 
-    return get_records_sql("SELECT id, username, email, firstname, lastname, city, country, lastaccess  
+/// warning: will return unconfirmed users
+    return get_records_sql("SELECT id, username, email, firstname, lastname, city, country, lastaccess, confirmed
                               FROM {$CFG->prefix}user 
                              WHERE username <> 'guest' 
-                               AND deleted <> 1 and confirmed = 1 $search
+                               AND deleted <> 1 $search
                           ORDER BY $sort $dir $limit");
 
 }