3 function sitemembers_pagesetup() {
6 function sitemembers_init() {
9 $CFG->templates
->variables_substitute
['sitemembericons'][] = "sitemembers_random_users";
13 function sitemembers_random_users($vars) {
16 if (!isset($vars[1])) {
19 $numberofusers = (int) $vars[1];
24 if ($users = get_records_sql("select * from ".$CFG->prefix
."users where icon <> -1 and user_type = 'person' order by rand() limit $numberofusers")) {
25 foreach($users as $user) {
27 $html .= "<a href=\"{$CFG->wwwroot}{$user->username}\"><img src=\"{$CFG->wwwroot}_icon/user/{$user->icon}/h/67/w/67\" alt=\"" . htmlspecialchars($user->name
) . "\" /></a> ";