set_url('/userpix/index.php'); require_login(); /// Remove the following three lines if you want everyone to access it $syscontext = context_system::instance(); require_capability('moodle/site:config', $syscontext); $title = get_string("users"); $PAGE->set_context($syscontext); $PAGE->navbar->add($title); $PAGE->set_title($title); $PAGE->set_heading($title); echo $OUTPUT->header(); $rs = $DB->get_recordset_select("user", "deleted = 0 AND picture > 0", array(), "lastaccess DESC", user_picture::fields()); foreach ($rs as $user) { $fullname = s(fullname($user)); echo "wwwroot/user/view.php?id=$user->id&course=1\" ". "title=\"$fullname\">"; echo $OUTPUT->user_picture($user); echo " \n"; } $rs->close(); echo $OUTPUT->footer();