Update add_user
parent
d781dd02d2
commit
ada97d6309
10
add_user
10
add_user
|
@ -20,10 +20,10 @@ $passwordhash = md5($password);
|
|||
|
||||
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));
|
||||
|
||||
$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);
|
||||
|
||||
# $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 (?,?,?);";
|
||||
# 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));
|
||||
|
||||
$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));
|
||||
|
||||
$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::commit();
|
||||
|
|
Loading…
Reference in New Issue