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

[feature/oauth] Properly check that all data needed is available

PHPBB3-11673
This commit is contained in:
Joseph Warner
2013-07-29 13:10:56 -04:00
parent bcdeafedd7
commit c09bda10fc
3 changed files with 29 additions and 3 deletions

View File

@@ -337,4 +337,22 @@ class phpbb_auth_provider_oauth extends phpbb_auth_provider_base
return $ret;
}
/**
* {@inheritdoc}
*/
public function login_link_has_necessary_data($login_link_data)
{
if (empty($login_link_data))
{
return 'LOGIN_LINK_NO_DATA_PROVIDED';
}
if (!array_key_exists('oauth_service', $login_link_data) || !$login_link_data['oauth_service'])
{
return 'LOGIN_LINK_MISSING_DATA';
}
return null;
}
}