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
+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);