aboutsummaryrefslogtreecommitdiff
path: root/start.php
diff options
context:
space:
mode:
authorSem <sembrestels@riseup.net>2012-09-22 05:06:19 +0200
committerSem <sembrestels@riseup.net>2012-09-22 05:06:19 +0200
commite69825051c3d19f188e68801ba945c1cd8b8cfdd (patch)
tree356d890af39dc2798ceb3b83e79a2078062d6b5e /start.php
parent1c1fe3b50e5a3297115c57543932a210d585a539 (diff)
downloadelgg-e69825051c3d19f188e68801ba945c1cd8b8cfdd.tar.gz
elgg-e69825051c3d19f188e68801ba945c1cd8b8cfdd.tar.bz2
Removed comercial openid providers and refactored openid login form.
Diffstat (limited to 'start.php')
-rw-r--r--start.php60
1 files changed, 7 insertions, 53 deletions
diff --git a/start.php b/start.php
index 82dcd5c11..1bf85eb74 100644
--- a/start.php
+++ b/start.php
@@ -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() {