$file = 'f2';
}
$class = "userpicture";
-
+ if (!empty($HTTPSPAGEREQUIRED)) {
+ $wwwroot = $CFG->httpswwwroot;
+ } else {
+ $wwwroot = $CFG->wwwroot;
+ }
if (is_null($picture)) {
$picture = $user->picture;
if ($picture) { // Print custom user picture
if ($CFG->slasharguments) { // Use this method if possible for better caching
- $src = $CFG->wwwroot .'/user/pix.php/'. $user->id .'/'. $file .'.jpg';
+ $src = $wwwroot .'/user/pix.php/'. $user->id .'/'. $file .'.jpg';
} else {
- $src = $CFG->wwwroot .'/user/pix.php?file=/'. $user->id .'/'. $file .'.jpg';
+ $src = $wwwroot .'/user/pix.php?file=/'. $user->id .'/'. $file .'.jpg';
}
} else { // Print default user pictures (use theme version if available)
$class .= " defaultuserpic";