From 4003e077c170e2c9aebbf582cb08249d80d37a3d Mon Sep 17 00:00:00 2001
From: Joseph Warner <hardolaf@hardolaf.com>
Date: Mon, 12 Aug 2013 14:43:18 -0400
Subject: [feature/oauth] Get the OAuth template in place for ucp_auth_link

PHPBB3-11673
---
 phpBB/phpbb/auth/provider/oauth/oauth.php | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'phpBB/phpbb')

diff --git a/phpBB/phpbb/auth/provider/oauth/oauth.php b/phpBB/phpbb/auth/provider/oauth/oauth.php
index d0b5583d77..1b0674a13b 100644
--- a/phpBB/phpbb/auth/provider/oauth/oauth.php
+++ b/phpBB/phpbb/auth/provider/oauth/oauth.php
@@ -452,7 +452,7 @@ class phpbb_auth_provider_oauth extends phpbb_auth_provider_base
 
 		// Get all external accounts tied to the current user
 		$data = array(
-			'user_id' => $user->data['user_id'],
+			'user_id' => $this->user->data['user_id'],
 		);
 		$sql = 'SELECT oauth_provider_id, provider FROM ' . $this->auth_provider_oauth_token_account_assoc . '
 			WHERE ' . $this->db->sql_build_array('SELECT', $data);
@@ -462,9 +462,9 @@ class phpbb_auth_provider_oauth extends phpbb_auth_provider_base
 
 		$oauth_user_ids = array();
 
-		if ($row !== false && !empty($rows))
+		if ($rows !== false && !empty($rows))
 		{
-			foreach ($row as $row)
+			foreach ($rows as $row)
 			{
 				$oauth_user_ids[$row['provider']] = $row['oauth_provider_id'];
 			}
-- 
cgit v1.2.1