aboutsummaryrefslogtreecommitdiff
path: root/pages
diff options
context:
space:
mode:
Diffstat (limited to 'pages')
-rw-r--r--pages/admin.php27
-rw-r--r--pages/confirm.php46
-rw-r--r--pages/reset.php12
-rw-r--r--pages/sso.php52
4 files changed, 0 insertions, 137 deletions
diff --git a/pages/admin.php b/pages/admin.php
deleted file mode 100644
index 9390e5b00..000000000
--- a/pages/admin.php
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-require_once(dirname(dirname(__FILE__)).'/models/model.php');
-
-// let admins configure the OpenID client
-
-admin_gatekeeper();
-
-set_context('admin');
-
-$title = elgg_echo('openid_client:admin_title');
-
-$content = elgg_view_title($title);
-
-$content .= elgg_view("openid_client/forms/admin",
- array(
- 'default_server' => get_plugin_setting('default_server','openid_client'),
- 'always_sync' => get_plugin_setting('always_sync','openid_client'),
- 'sso' => get_plugin_setting('sso','openid_client'),
- 'greenlist' => get_plugin_setting('greenlist','openid_client'),
- 'yellowlist' => get_plugin_setting('yellowlist','openid_client'),
- 'redlist' => get_plugin_setting('redlist','openid_client'),
- ));
-
-
-$body = elgg_view_layout("two_column_left_sidebar", '', $content);
-
-page_draw($title, $body);
diff --git a/pages/confirm.php b/pages/confirm.php
deleted file mode 100644
index 1f2668620..000000000
--- a/pages/confirm.php
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
-
-// This used to be an action, but as it is sent in an email message
-// with unknown response time, it cannot have an action time stamp
-// and so is now just a page
-
-require_once(dirname(dirname(__FILE__)).'/models/model.php');
-
-set_context('openid');
-$code = get_input('code');
-if (empty($code)) {
- register_error(elgg_echo("openid_client:missing_confirmation_code"));
-} elseif ($code{0} == 'a') {
- // request to activate an account
- if (!$details = openid_client_get_invitation($code)) {
- register_error(elgg_echo("openid_client:invalid_code_error"));
- } else {
- // OK, everything seems to be in order, so activate this user
- $user = get_user($details->new_owner);
- $user->email = $details->email;
- $user->name = $details->name;
- $user->active = 'yes';
- $user->save();
- system_message(sprintf(elgg_echo("openid_client:account_created"), $details->username));
- openid_client_remove_invitation($code);
- }
-
-} elseif ($code{0} == 'c') {
- // request to change an email address
- if (!$details = openid_client_get_invitation($code)) {
- register_error(elgg_echo("openid_client:invalid_code_error"));
- } else {
- // OK, everything seems to be in order, so change the email address
- $user = get_user($details->new_owner);
- $user->email = $details->email;
- $user->save();
- system_message(sprintf(elgg_echo('openid_client:email_changed'),$details->email));
- openid_client_remove_invitation($code);
- }
-}
-
-if(isset($body) && $body) {
- page_draw(elgg_echo('openid_client:confirmation_title'),$body);
-} else {
- forward();
-}
diff --git a/pages/reset.php b/pages/reset.php
deleted file mode 100644
index aa85f3386..000000000
--- a/pages/reset.php
+++ /dev/null
@@ -1,12 +0,0 @@
-<?php
-require_once(dirname(dirname(__FILE__)).'/models/model.php');
-
-admin_gatekeeper();
-
-set_context('openid');
-
-$store = new OpenID_ElggStore();
-$store->resetAssociations();
-$store->resetNonces();
-
-print "OpenID store reset";
diff --git a/pages/sso.php b/pages/sso.php
deleted file mode 100644
index a0098ce72..000000000
--- a/pages/sso.php
+++ /dev/null
@@ -1,52 +0,0 @@
-<?php
-require_once(dirname(dirname(__FILE__)).'/models/model.php');
-global $CONFIG;
-
-$sso = get_plugin_setting('sso','openid_client');
-if (!isloggedin() && ($sso == 'yes')) {
- openid_client_handle_login();
-} else {
- forward();
-}
-exit;
-// $url = $CONFIG->wwwroot.'action/openid_client/login';
-// $ts = time();
-// $token = generate_action_token($ts);
-// $fields = array(
-// '__elgg_token'=>$token,
-// '__elgg_ts'=>$ts,
-// 'passthru_url'=>'',
-// 'externalservice'=>'',
-// 'username'=>urlencode($openid_url),
-// );
-//
-// //url-ify the data for the POST
-// foreach($fields as $key=>$value) {
-// $fields_string .= $key.'='.$value.'&';
-// }
-// rtrim($fields_string,'&');
-//
-// //open connection
-// $ch = curl_init();
-//
-// //set the url, number of POST vars, POST data
-// curl_setopt($ch,CURLOPT_URL,$url);
-// //curl_setopt($ch,CURLOPT_POST,count($fields));
-// curl_setopt($ch,CURLOPT_POST,true);
-// curl_setopt($ch,CURLOPT_POSTFIELDS,$fields_string);
-// curl_setopt($ch,CURLOPT_RETURNTRANSFER,false);
-// curl_setopt($ch,CURLOPT_FAILONERROR,true);
-// //curl_setopt($ch,CURLOPT_HEADER, true);
-// curl_setopt($ch,CURLOPT_FOLLOWLOCATION,true);
-//
-// //execute post
-// curl_exec($ch);
-//
-// //print_r (curl_getinfo($ch));
-//
-// //print $result;
-//
-// //close connection
-// curl_close($ch);
-
-?> \ No newline at end of file