mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 02:44:53 +00:00
Add check on edit user to see if User directory is created before Avatar upload
This commit is contained in:
4
post.php
4
post.php
@@ -80,6 +80,10 @@ if(isset($_POST['edit_user'])){
|
||||
}
|
||||
$path = strip_tags(mysqli_real_escape_string($mysqli,$_POST['current_avatar_path']));
|
||||
|
||||
if(!file_exists("uploads/users/$user_id")) {
|
||||
mkdir("uploads/users/$user_id");
|
||||
}
|
||||
|
||||
if($_FILES['file']['tmp_name']!='') {
|
||||
//delete old avatar file
|
||||
unlink($path);
|
||||
|
||||
Reference in New Issue
Block a user