Use mongodb instead of MySQL for user UIDs tracking
This commit is contained in:
@@ -75,6 +75,7 @@ function loadUserSettings()
|
||||
{
|
||||
global $modSettings, $user_settings;
|
||||
global $ID_MEMBER, $db_prefix, $cookiename, $user_info, $language;
|
||||
global $mongodb;
|
||||
|
||||
// Check first the cookie, then the session.
|
||||
if (isset($_COOKIE[$cookiename]))
|
||||
@@ -149,9 +150,11 @@ function loadUserSettings()
|
||||
);
|
||||
|
||||
$__uid = str_replace("uid=","",$_SERVER['USERID']);
|
||||
db_query("
|
||||
INSERT IGNORE INTO smf_member_uids VALUES('{$ID_MEMBER}', '{$__uid}')",
|
||||
__FILE__, __LINE__);
|
||||
$mongodb->rock->memberUids->update(
|
||||
array('member' => $ID_MEMBER),
|
||||
array('$addToSet' => array('uids' => $__uid)),
|
||||
array('upsert' => true)
|
||||
);
|
||||
|
||||
}
|
||||
// If the user is a guest, initialize all the critial user settings.
|
||||
|
||||
Reference in New Issue
Block a user