summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorfisharebest <fisharebest@gmail.com>2010-04-27 17:04:39 +0000
committerfisharebest <fisharebest@gmail.com>2010-04-27 17:04:39 +0000
commita5b07ad5b9c476dead398fac7582dc52b758aeb4 (patch)
treeb71df1a94f4c1e0aa94d9225f9dcf2a4866ac198 /includes
parent2dc0b923f7b83999c5a79ce694a2e3f8b23eadf5 (diff)
downloadwebtrees-a5b07ad5b9c476dead398fac7582dc52b758aeb4.tar.gz
webtrees-a5b07ad5b9c476dead398fac7582dc52b758aeb4.tar.bz2
webtrees-a5b07ad5b9c476dead398fac7582dc52b758aeb4.zip
Fix: bug when creating new user accounts
Diffstat (limited to 'includes')
-rw-r--r--includes/functions/functions_db.php6
-rw-r--r--includes/functions/functions_export.php2
2 files changed, 4 insertions, 4 deletions
diff --git a/includes/functions/functions_db.php b/includes/functions/functions_db.php
index 963c4d61f1..f5b07695ff 100644
--- a/includes/functions/functions_db.php
+++ b/includes/functions/functions_db.php
@@ -2449,12 +2449,12 @@ function set_gedcom_setting($ged_id, $setting_name, $setting_value) {
// Functions to access the WT_USER table
////////////////////////////////////////////////////////////////////////////////
-function create_user($username, $realname, $password) {
+function create_user($username, $realname, $email, $password) {
global $TBLPREFIX;
try {
- WT_DB::prepare("INSERT INTO {$TBLPREFIX}user (user_name, real_name, password) VALUES (?, ?, ?)")
- ->execute(array($username, $realname, $password));
+ WT_DB::prepare("INSERT INTO {$TBLPREFIX}user (user_name, real_name, email, password) VALUES (?, ?, ?, ?)")
+ ->execute(array($username, $realname, $email, $password));
} catch (PDOException $ex) {
// User already exists?
}
diff --git a/includes/functions/functions_export.php b/includes/functions/functions_export.php
index 5a0287c7af..22a1030f04 100644
--- a/includes/functions/functions_export.php
+++ b/includes/functions/functions_export.php
@@ -165,7 +165,7 @@ function createTempUser($userID, $rights, $gedcom) {
}
$ged_id=get_id_from_gedcom($gedcom);
- $tempUserID=create_user($userID, md5(rand()));
+ $tempUserID=create_user($userID, "Dummy User", "dummy@email", md5(rand()));
if (!$tempUserID) return false;
set_user_setting($tempUserID, 'relationship_privacy', 'N');