diff options
author | Joseph Warner <hardolaf@hardolaf.com> | 2013-08-02 14:37:15 -0400 |
---|---|---|
committer | Joseph Warner <hardolaf@hardolaf.com> | 2013-08-02 14:37:39 -0400 |
commit | 3cbb97316066b606548af5d24b4fe2199533cffe (patch) | |
tree | e6fd05c04e579172b736199415a7b6a9d60e921c /phpBB/phpbb | |
parent | e16dd958e351c39371db943fec359677c950c9ec (diff) | |
download | forums-3cbb97316066b606548af5d24b4fe2199533cffe.tar forums-3cbb97316066b606548af5d24b4fe2199533cffe.tar.gz forums-3cbb97316066b606548af5d24b4fe2199533cffe.tar.bz2 forums-3cbb97316066b606548af5d24b4fe2199533cffe.tar.xz forums-3cbb97316066b606548af5d24b4fe2199533cffe.zip |
[feature/oauth] Pass users_table as parameter to OAuth in construct
PHPBB3-11673
Diffstat (limited to 'phpBB/phpbb')
-rw-r--r-- | phpBB/phpbb/auth/provider/oauth/oauth.php | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/phpBB/phpbb/auth/provider/oauth/oauth.php b/phpBB/phpbb/auth/provider/oauth/oauth.php index 786caf5463..4973cde349 100644 --- a/phpBB/phpbb/auth/provider/oauth/oauth.php +++ b/phpBB/phpbb/auth/provider/oauth/oauth.php @@ -75,6 +75,13 @@ class phpbb_auth_provider_oauth extends phpbb_auth_provider_base protected $service_providers; /** + * Users table + * + * @var string + */ + protected $users_table; + + /** * Cached current uri object * * @var \OAuth\Common\Http\Uri\UriInterface|null @@ -91,8 +98,9 @@ class phpbb_auth_provider_oauth extends phpbb_auth_provider_base * @param string $auth_provider_oauth_token_storage_table * @param string $auth_provider_oauth_token_account_assoc * @param phpbb_di_service_collection $service_providers Contains phpbb_auth_provider_oauth_service_interface + * @param string $users)table */ - public function __construct(phpbb_db_driver $db, phpbb_config $config, phpbb_request $request, phpbb_user $user, $auth_provider_oauth_token_storage_table, $auth_provider_oauth_token_account_assoc, phpbb_di_service_collection $service_providers) + public function __construct(phpbb_db_driver $db, phpbb_config $config, phpbb_request $request, phpbb_user $user, $auth_provider_oauth_token_storage_table, $auth_provider_oauth_token_account_assoc, phpbb_di_service_collection $service_providers, $users_table) { $this->db = $db; $this->config = $config; @@ -101,6 +109,7 @@ class phpbb_auth_provider_oauth extends phpbb_auth_provider_base $this->auth_provider_oauth_token_storage_table = $auth_provider_oauth_token_storage_table; $this->auth_provider_oauth_token_account_assoc = $auth_provider_oauth_token_account_assoc; $this->service_providers = $service_providers; + $this->users_table = $users_table; } /** @@ -184,7 +193,7 @@ class phpbb_auth_provider_oauth extends phpbb_auth_provider_base // Retrieve the user's account $sql = 'SELECT user_id, username, user_password, user_passchg, user_pass_convert, user_email, user_type, user_login_attempts - FROM ' . USERS_TABLE . " + FROM ' . $this->users_table . " WHERE user_id = '" . $this->db->sql_escape($row['user_id']) . "'"; $result = $this->db->sql_query($sql); $row = $this->db->sql_fetchrow($result); |