From 69e158865560bba4264646faa0799aa6e457c6d0 Mon Sep 17 00:00:00 2001 From: Joseph Warner Date: Sat, 13 Jul 2013 17:59:04 -0400 Subject: [PATCH] [feature/oauth] Store anonymous user by session id PHPBB3-9734 --- phpBB/develop/create_schema_files.php | 6 +++++- .../includes/db/migration/data/310/auth_provider_oauth.php | 7 +++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/phpBB/develop/create_schema_files.php b/phpBB/develop/create_schema_files.php index f3eeb31c28..c7d3cc4106 100644 --- a/phpBB/develop/create_schema_files.php +++ b/phpBB/develop/create_schema_files.php @@ -926,10 +926,14 @@ function get_schema_struct() $schemda_data['auth_provider_oauth'] = array( 'COLUMNS' => array( 'user_id' => array('UINT', 0), // phpbb_users.user_id + 'session_id' => array('CHAR:32', ''), // phpbb_sessions.session_id used only when user_id not set 'oauth_provider' => array('VCHAR'), // Name of the OAuth provider 'oauth_token' => array('TEXT_UNI'), // Serialized token ), - 'PRIMARY_KEY' => array('user_id', 'oauth_provider'), + 'KEYS' => array( + 'user_id' => array('INDEX', 'user_id'), + 'oauth_provider' => array('INDEX', 'oauth_provider'), + ), ); $schema_data['phpbb_banlist'] = array( diff --git a/phpBB/includes/db/migration/data/310/auth_provider_oauth.php b/phpBB/includes/db/migration/data/310/auth_provider_oauth.php index 6239cf97bc..92da42ba31 100644 --- a/phpBB/includes/db/migration/data/310/auth_provider_oauth.php +++ b/phpBB/includes/db/migration/data/310/auth_provider_oauth.php @@ -21,13 +21,16 @@ class phpbb_db_migration_data_310_auth_provider_oauth extends phpbb_db_migration $this->table_prefix . 'auth_provider_oauth' => array( 'COLUMNS' => array( 'user_id' => array('UINT', 0), // phpbb_users.user_id + 'session_id' => array('CHAR:32', ''), // phpbb_sessions.session_id used only when user_id not set 'oauth_provider' => array('VCHAR'), // Name of the OAuth provider 'oauth_token' => array('TEXT_UNI'), // Serialized token ), - 'PRIMARY_KEY' => array('user_id', 'oauth_provider'), + 'KEYS' => array( + 'user_id' => array('INDEX', 'user_id'), + 'oauth_provider' => array('INDEX', 'oauth_provider'), + ), ), ), - ); }