From 1b337fe72ea6131d187eadddc6fd8e6edebfefb1 Mon Sep 17 00:00:00 2001 From: "johnny@pittpc.com" Date: Tue, 31 Mar 2020 14:32:57 -0400 Subject: [PATCH] Fixed add user and edit as well as update user, which were not working. Added autocomplete=new-password to add/edit user and update password --- add_user_modal.php | 4 ++-- edit_user_modal.php | 2 +- post.php | 6 +++++- settings-user.php | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/add_user_modal.php b/add_user_modal.php index eb3a1d33..bbab191a 100644 --- a/add_user_modal.php +++ b/add_user_modal.php @@ -10,7 +10,7 @@
diff --git a/edit_user_modal.php b/edit_user_modal.php index 73a27916..7aca88e5 100644 --- a/edit_user_modal.php +++ b/edit_user_modal.php @@ -48,7 +48,7 @@
- +
diff --git a/post.php b/post.php index 1fec39ea..4ece8644 100644 --- a/post.php +++ b/post.php @@ -20,10 +20,14 @@ if(isset($_POST['add_user'])){ $password = md5($_POST['password']); $client_id = intval($_POST['client']); - mysqli_query($mysqli,"INSERT INTO users SET name = '$name', email = '$email', password = '$password', avatar = '$path', created_at = NOW(), client_id = $client_id"); + mysqli_query($mysqli,"INSERT INTO users SET name = '$name', email = '$email', password = '$password', created_at = NOW()"); $user_id = mysqli_insert_id($mysqli); + if(!file_exists("uploads/users/$user_id/")) { + mkdir("uploads/users/$user_id"); + } + if($_FILES['file']['tmp_name']!='') { $path = "uploads/users/$user_id/"; $path = $path . time() . basename( $_FILES['file']['name']); diff --git a/settings-user.php b/settings-user.php index 39bec69a..961bee72 100644 --- a/settings-user.php +++ b/settings-user.php @@ -62,7 +62,7 @@ $password = $row['password'];
- +