<?php
$maxbytes = get_max_upload_file_size($CFG->maxbytes, $course->maxbytes);
- if (!empty($CFG->gdversion) and $maxbytes and empty($CFG->disableuserimages)) {
+ if (!empty($CFG->gdversion) and $maxbytes and (empty($CFG->disableuserimages) or isadmin())) {
?>
<tr>
<th><?php print_string("currentpicture") ?>:</th>
$usernew->username = moodle_strtolower($usernew->username);
}
+ if (!empty($_FILES) and !(empty($CFG->disableuserimages) or isadmin())) {
+ error('Users can not update profile images!');
+ }
require_once($CFG->dirroot.'/lib/uploadlib.php');
$um = new upload_manager('imagefile',false,false,null,false,0,true,true);