summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/adduser.inc.php7
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
+}