admins can now edit user images even when $CFG->disableuserimages = true; see bug #5494 and SC#253

This commit is contained in:
skodak
2006-05-17 18:57:18 +00:00
parent 4a1f1588f0
commit 2c97ca5d59
2 changed files with 4 additions and 1 deletions
+1 -1
View File
@@ -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>
+3
View File
@@ -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);