1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

[ticket/13564] Allow to specify user id for retrieving auth link data

PHPBB3-13564
This commit is contained in:
Marc Alexander
2015-02-03 14:42:42 +01:00
parent 3d0153de60
commit ca883f1196
3 changed files with 8 additions and 4 deletions

View File

@@ -553,13 +553,13 @@ class oauth extends \phpbb\auth\provider\base
/**
* {@inheritdoc}
*/
public function get_auth_link_data()
public function get_auth_link_data($user_id = 0)
{
$block_vars = array();
// Get all external accounts tied to the current user
$data = array(
'user_id' => (int) $this->user->data['user_id'],
'user_id' => ($user_id <= 0) ? (int) $this->user->data['user_id'] : (int) $user_id,
);
$sql = 'SELECT oauth_provider_id, provider FROM ' . $this->auth_provider_oauth_token_account_assoc . '
WHERE ' . $this->db->sql_build_array('SELECT', $data);