admins can now edit user images even when $CFG->disableuserimages = true; see bug #5494 and SC#253
This commit is contained in:
+1
-1
@@ -275,7 +275,7 @@ if (isadmin()) {
|
||||
|
||||
<?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>
|
||||
|
||||
@@ -138,6 +138,9 @@
|
||||
$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);
|
||||
|
||||
Reference in New Issue
Block a user