diff options
author | Joseph Warner <hardolaf@hardolaf.com> | 2013-08-09 05:16:39 -0400 |
---|---|---|
committer | Joseph Warner <hardolaf@hardolaf.com> | 2013-08-09 05:17:27 -0400 |
commit | 0b80aaf2178e5a40f9429ce972c490f6067ef114 (patch) | |
tree | ab4b241f5fd21bb89c6948275ee476b6557a1eb2 | |
parent | deb62d51fe4e06e52fbc4042b692071bcd8f9d39 (diff) | |
download | forums-0b80aaf2178e5a40f9429ce972c490f6067ef114.tar forums-0b80aaf2178e5a40f9429ce972c490f6067ef114.tar.gz forums-0b80aaf2178e5a40f9429ce972c490f6067ef114.tar.bz2 forums-0b80aaf2178e5a40f9429ce972c490f6067ef114.tar.xz forums-0b80aaf2178e5a40f9429ce972c490f6067ef114.zip |
[feature/oauth] Add method to return necessary data for auth_link
PHPBB3-11673
-rw-r--r-- | phpBB/includes/ucp/ucp_auth_link.php | 11 | ||||
-rw-r--r-- | phpBB/phpbb/auth/provider/base.php | 8 |
2 files changed, 18 insertions, 1 deletions
diff --git a/phpBB/includes/ucp/ucp_auth_link.php b/phpBB/includes/ucp/ucp_auth_link.php index 6bf74d4fbf..c1d97c8cf8 100644 --- a/phpBB/includes/ucp/ucp_auth_link.php +++ b/phpBB/includes/ucp/ucp_auth_link.php @@ -21,7 +21,16 @@ class ucp_auth_link public function main($id, $mode) { - global $template, $phpbb_container; + global $config, $request, $template, $phpbb_container; + + $auth_provider = $phpbb_container->get('auth.provider.' . $config['auth_method']); + + // confirm that the auth provider supports this page + $provider_data = $auth_provider->get_auth_link_data(); + if ($provider_data === null) + { + // does not support this page, throw error? + } $error = array(); $s_hidden_fields = array(); diff --git a/phpBB/phpbb/auth/provider/base.php b/phpBB/phpbb/auth/provider/base.php index ae1daba82b..2f1bf8f601 100644 --- a/phpBB/phpbb/auth/provider/base.php +++ b/phpBB/phpbb/auth/provider/base.php @@ -65,6 +65,14 @@ abstract class phpbb_auth_provider_base implements phpbb_auth_provider_interface /** * {@inheritdoc} */ + public function get_auth_link_data() + { + return; + } + + /** + * {@inheritdoc} + */ public function logout($data, $new_session) { return; |