Trim white space before and after when adding password to a contact
This commit is contained in:
@@ -4276,7 +4276,7 @@ if(isset($_POST['edit_contact'])){
|
|||||||
|
|
||||||
// Set password
|
// Set password
|
||||||
if(!empty($_POST['contact_password'])){
|
if(!empty($_POST['contact_password'])){
|
||||||
$password_hash = password_hash($_POST['contact_password'], PASSWORD_DEFAULT);
|
$password_hash = password_hash(trim($_POST['contact_password']), PASSWORD_DEFAULT);
|
||||||
mysqli_query($mysqli, "UPDATE contacts SET contact_password_hash = '$password_hash' WHERE contact_id = $contact_id AND contact_client_id = $client_id");
|
mysqli_query($mysqli, "UPDATE contacts SET contact_password_hash = '$password_hash' WHERE contact_id = $contact_id AND contact_client_id = $client_id");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user