]> git.mjollnir.org Git - moodle.git/commitdiff
admins can now edit user images even when $CFG->disableuserimages = true; see bug...
authorskodak <skodak>
Wed, 17 May 2006 18:59:43 +0000 (18:59 +0000)
committerskodak <skodak>
Wed, 17 May 2006 18:59:43 +0000 (18:59 +0000)
user/edit.html
user/edit.php

index 5357ae49addf30166dd428b211ab3802beda55fa..4c7ca64d9227d77aded52841de4c8a67e61a0181 100644 (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>
index a02c55f88e4b913053aed6436d5252627d63251a..0b3656e5aeac3472158830b5a05affe66c40e8c2 100644 (file)
             $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);