Skip to content

Commit

Permalink
Small bugfix with uploading new user images
Browse files Browse the repository at this point in the history
  • Loading branch information
moodler committed Nov 21, 2002
1 parent f74dcc5 commit b913b36
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion user/edit.php
Expand Up @@ -49,7 +49,7 @@
$usernew->firstname = strip_tags($usernew->firstname);
$usernew->lastname = strip_tags($usernew->lastname);

if (find_form_errors($user, $usernew, $err) ) {
if (find_form_errors($user, $usernew, $err)) {
if ($filename = valid_uploaded_file($imagefile)) {
$usernew->picture = save_user_image($user->id, $filename);
}
Expand Down
4 changes: 2 additions & 2 deletions user/lib.php
Expand Up @@ -88,8 +88,8 @@ function save_user_image($userid, $filename) {
$badpermissions = true;
}
}
if (!file_exists("$CFG->dataroot/users/$user->id")) {
if (! mkdir("$CFG->dataroot/users/$user->id", 0777)) {
if (!file_exists("$CFG->dataroot/users/$userid")) {
if (! mkdir("$CFG->dataroot/users/$userid", 0777)) {
$badpermissions = true;
}
}
Expand Down

0 comments on commit b913b36

Please sign in to comment.