From: skodak Date: Wed, 17 May 2006 18:59:43 +0000 (+0000) Subject: admins can now edit user images even when $CFG->disableuserimages = true; see bug... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=c0e2f1f7dd262236bb18d94bcdd042988a474231;p=moodle.git admins can now edit user images even when $CFG->disableuserimages = true; see bug #5494 and SC#253; merged from MOODLE_16_STABLE --- diff --git a/user/edit.html b/user/edit.html index 5357ae49ad..4c7ca64d92 100644 --- a/user/edit.html +++ b/user/edit.html @@ -275,7 +275,7 @@ if (isadmin()) { 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())) { ?> : diff --git a/user/edit.php b/user/edit.php index a02c55f88e..0b3656e5ae 100644 --- a/user/edit.php +++ b/user/edit.php @@ -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);