diff options
-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; |