mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 19:04:52 +00:00
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
This commit is contained in:
6
post.php
6
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']);
|
||||
|
||||
Reference in New Issue
Block a user