Update add_user

master
Patrick Höhn 2017-07-30 22:50:54 +02:00 committed by GitHub
parent d781dd02d2
commit ada97d6309
1 changed files with 5 additions and 5 deletions

View File

@ -20,10 +20,10 @@ $passwordhash = md5($password);
Zotero_DB::beginTransaction(); Zotero_DB::beginTransaction();
$sql = "INSERT INTO zotero_www.users (username, password) VALUES (?,?)"; $sql = "INSERT INTO zotero_www_test.users (username, password) VALUES (?,?)";
Zotero_DB::query($sql, array( $username,$passwordhash)); Zotero_DB::query($sql, array( $username,$passwordhash));
$sql = "SELECT userID FROM zotero_www.users WHERE username=?"; $sql = "SELECT userID FROM zotero_www_test.users WHERE username=?";
$userID = Zotero_DB::valueQuery($sql, $username); $userID = Zotero_DB::valueQuery($sql, $username);
# $sql = "INSERT INTO zotero_master.users (userID, libraryID, username) VALUES (?,?)"; # $sql = "INSERT INTO zotero_master.users (userID, libraryID, username) VALUES (?,?)";
@ -32,13 +32,13 @@ Zotero_DB::beginTransaction();
# $sql = "INSERT INTO zotero_master.storageAccounts (userID, quota, expiration) VALUES (?,?,?);"; # $sql = "INSERT INTO zotero_master.storageAccounts (userID, quota, expiration) VALUES (?,?,?);";
# Zotero_DB::query($sql,array($userID, '10000', '2020-12-31 00:00:00')); # Zotero_DB::query($sql,array($userID, '10000', '2020-12-31 00:00:00'));
$sql = "INSERT INTO zotero_www.users_email (userID, email) VALUES (?,?);"; $sql = "INSERT INTO zotero_www_test.users_email (userID, email) VALUES (?,?);";
Zotero_DB::query($sql,array($userID, $email)); Zotero_DB::query($sql,array($userID, $email));
$sql = "INSERT INTO zotero_www.LUM_User (RoleID, UserID) VALUES (3,?);"; $sql = "INSERT INTO zotero_www_test.LUM_User (RoleID, UserID) VALUES (3,?);";
Zotero_DB::query($sql,array($userID)); Zotero_DB::query($sql,array($userID));
$sql = "INSERT INTO zotero_www.users_meta (userID, metaKey, metaValue) VALUES (?,'profile_realname',?);"; $sql = "INSERT INTO zotero_www_test.users_meta (userID, metaKey, metaValue) VALUES (?,'profile_realname',?);";
Zotero_DB::query($sql,array($userID,$real_user)); Zotero_DB::query($sql,array($userID,$real_user));
Zotero_DB::commit(); Zotero_DB::commit();