"MDL-14129,fix print_error"
[moodle.git] / userpix / upgrade.php
index 43f2575..e83f2fd 100644 (file)
@@ -9,8 +9,8 @@
 
     require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM));
 
-    if (!$users = get_records("user", "picture", "1", "lastaccess DESC", "id,firstname,lastname")) {
-        print_error("no users!");
+    if (!$users = $DB->get_records("user", array("picture"=>"1"), "lastaccess DESC", "id,firstname,lastname")) {
+        print_error('nousers');
     }
 
     $title = get_string("users");