diff options
author | Simon Rettberg | 2022-11-22 17:08:31 +0100 |
---|---|---|
committer | Simon Rettberg | 2022-11-22 17:08:31 +0100 |
commit | 5e9fe828db9a23c8e98da1be3bc0e4961a6b3dde (patch) | |
tree | 91b44cac12f4d3150f9d0ab35f8e0cd1a362f43d | |
parent | [inc/Database] Update with latest version from slx-admin (diff) | |
download | bwlp-webadmin-5e9fe828db9a23c8e98da1be3bc0e4961a6b3dde.tar.gz bwlp-webadmin-5e9fe828db9a23c8e98da1be3bc0e4961a6b3dde.tar.xz bwlp-webadmin-5e9fe828db9a23c8e98da1be3bc0e4961a6b3dde.zip |
[adduser] Fix password change
-rw-r--r-- | modules/adduser.inc.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/adduser.inc.php b/modules/adduser.inc.php index 62cb840..20bfe47 100644 --- a/modules/adduser.inc.php +++ b/modules/adduser.inc.php @@ -47,8 +47,9 @@ class Page_AddUser extends Page if ($ok === false) { Message::addError('Login-Suffix @{{0}} ist ungültig.', $suffix); } else { - Database::exec('INSERT INTO user (userid, password, organizationid, firstname, lastname, email) ' - . ' VALUES (:userid, :password, :organization, :firstname, :lastname, :email)', array( + Database::exec('INSERT INTO user (userid, password, organizationid, firstname, lastname, email) + VALUES (:userid, :password, :organization, :firstname, :lastname, :email) + ON DUPLICATE KEY UPDATE password = VALUES(password)', array( 'userid' => $login, 'password' => Crypto::hash6($password), 'organization' => $organizationid, @@ -78,4 +79,4 @@ class Page_AddUser extends Page Render::addTemplate('adduser/_page', array('orgs' => $orgs)); } -}
\ No newline at end of file +} |