diff options
Diffstat (limited to 'start.php')
-rw-r--r-- | start.php | 60 |
1 files changed, 7 insertions, 53 deletions
@@ -15,7 +15,6 @@ function openid_client_init() { elgg_extend_view('css/elgg', 'openid_client/css');
elgg_extend_view('js/elgg', 'openid_client/js');
- elgg_extend_view('core/account/login_box', 'openid_client/login');
elgg_register_plugin_hook_handler('register', 'menu:openid_login', 'openid_client_setup_menu');
$base = elgg_get_plugins_path() . 'openid_client/actions/openid_client';
@@ -24,6 +23,13 @@ function openid_client_init() { $base = elgg_get_plugins_path() . 'openid_client/lib';
elgg_register_library('openid_client', "$base/helpers.php");
+
+ elgg_set_config('openid_providers', array(
+ 'N-1' => 'https://n-1.cc/openid/',
+ 'Ecoxarxes' => 'https://cooperativa.ecoxarxes.cat/openid/',
+ 'Anillosur' => 'https://anillosur.cc/openid/',
+ // ...
+ ));
// don't let OpenID users set their passwords
elgg_register_event_handler('pagesetup', 'system', 'openid_client_remove_password');
@@ -48,58 +54,6 @@ function openid_client_set_subtype($user) { }
/**
- * Register login options
- *
- * @param string $hook
- * @param string $type
- * @param array $menu
- * @param array $params
- * @return array
- */
-function openid_client_setup_menu($hook, $type, $menu, $params) {
-
- $items = array(
- 'large' => array(
- 'google' => '',
- 'yahoo' => '',
- ),
- 'small' => array(
- 'blogger' => 'toggle',
- 'wordpress' => 'toggle',
- ),
- );
- $items = elgg_trigger_plugin_hook('register', 'openid_client:login', null, $items);
-
- $priority = 100;
- foreach ($items as $type => $providers) {
- foreach ($providers as $provider => $toggle) {
- $provider_name = elgg_echo("openid_client:provider:$provider");
-
- $options = array(
- 'name' => $provider,
- 'text' => '<span></span>',
- 'title' => elgg_echo('openid_client:login:instructs', array($provider_name)),
- 'href' => "action/openid_client/login?openid_provider=$provider",
- 'is_action' => true,
- 'section' => $type,
- 'priority' => $priority,
- );
-
- if ($toggle) {
- $options['link_class'] = 'openid-client-toggle';
- $options['rel'] = $provider;
- }
-
- $menu[] = ElggMenuItem::factory($options);
-
- $priority += 10;
- }
- }
-
- return $menu;
-}
-
-/**
* Remove the password view from the account settings form
*/
function openid_client_remove_password() {
|