MDL-31877 Correct get_users exception
authorAndrew Robert Nicols <andrew.nicols@luns.net.uk>
Mon, 5 Mar 2012 13:48:55 +0000 (13:48 +0000)
committerAndrew Robert Nicols <andrew.nicols@luns.net.uk>
Mon, 5 Mar 2012 13:48:55 +0000 (13:48 +0000)
lib/datalib.php

index 9a8d62f..d25eb72 100644 (file)
@@ -222,7 +222,7 @@ function get_users($get=true, $search='', $confirmed=false, array $exceptions=nu
     if ($exceptions) {
         list($exceptions, $eparams) = $DB->get_in_or_equal($exceptions, SQL_PARAMS_NAMED, 'ex', false);
         $params = $params + $eparams;
-        $except = " AND id $exceptions";
+        $select .= " AND id $exceptions";
     }
 
     if ($firstinitial) {