[Multi] Fixes #1058 by including a 'force password update' option and also introduces a attributes json object to be used for further mailbox configurations in the future

This commit is contained in:
André Peters
2018-02-16 22:40:51 +01:00
parent 03031516e9
commit 2865c892a6
10 changed files with 30 additions and 22 deletions

View File

@@ -414,7 +414,7 @@ function edit_user_account($postarray) {
}
$password_hashed = hash_password($password_new);
try {
$stmt = $pdo->prepare("UPDATE `mailbox` SET `password` = :password_hashed WHERE `username` = :username");
$stmt = $pdo->prepare("UPDATE `mailbox` SET `password` = :password_hashed, `attributes` = JSON_SET(`attributes`, '$.force_pw_update', '0') WHERE `username` = :username");
$stmt->execute(array(
':password_hashed' => $password_hashed,
':username' => $username