2 // This script updates all users picturesi to remove black border.
5 include('../config.php');
6 include('../lib/gdlib.php');
11 error("Currently only the administrator can access this page!");
15 if (!$users = get_records("user", "picture", "1", "lastaccess DESC", "id,firstname,lastname")) {
19 $title = get_string("users");
21 print_header($title, $title, $title);
23 foreach ($users as $user) {
24 upgrade_profile_image($user->id
);
25 $fullname = fullname($user);
26 echo "<a href=\"$CFG->wwwroot/user/view.php?id=$user->id&course=1\"".
27 "title=\"$fullname\">";
28 if ($CFG->slasharguments
) { // Use this method if possible for better caching
29 echo '<img src="'. $CFG->wwwroot
.'/user/pix.php/'.$user->id
.'/f1.jpg"'.
30 ' border="0" width="100" height="100" alt="'.$fullname.'" />';
32 echo '<img src="'. $CFG->wwwroot
.'/user/pix.php?file=/'. $user->id
.'/f1.jpg"'.
33 ' border="0" width="100" height="100" alt="'.$fullname.'" />';