aboutsummaryrefslogtreecommitdiff
path: root/actions/sync.php
diff options
context:
space:
mode:
authorcash <cash.costello@gmail.com>2011-12-17 12:43:35 -0500
committercash <cash.costello@gmail.com>2011-12-17 12:43:35 -0500
commita62adbd9cb180fe6bbf88cff2f787d262f737ecb (patch)
tree9ecc324eba4dcdf57f98cde1bcc66e03c148b027 /actions/sync.php
parentbc56428d493d99576ff274611df3b029e7e47e0a (diff)
downloadelgg-a62adbd9cb180fe6bbf88cff2f787d262f737ecb.tar.gz
elgg-a62adbd9cb180fe6bbf88cff2f787d262f737ecb.tar.bz2
removed code from previous plugin
Diffstat (limited to 'actions/sync.php')
-rw-r--r--actions/sync.php57
1 files changed, 0 insertions, 57 deletions
diff --git a/actions/sync.php b/actions/sync.php
deleted file mode 100644
index 3f93df9df..000000000
--- a/actions/sync.php
+++ /dev/null
@@ -1,57 +0,0 @@
-<?php
-require_once(dirname(dirname(__FILE__)).'/models/model.php');
-
-set_context('openid');
-global $CONFIG;
-
-if (isloggedin()) {
-
- $userid = get_loggedin_userid();
- $user = get_user($userid);
- $namechange = get_input('namechange');
- $emailchange = get_input('emailchange');
- $nosync = get_input('nosync');
-
- if ($namechange) {
- $name = get_input('new_name');
- $user->name = $name;
- system_message(sprintf(elgg_echo("openid_client:name_updated"),$name));
- }
-
- if ($emailchange) {
- $i_code = get_input('i_code');
- if (empty($i_code)) {
- $new_email = get_input('new_email');
- // this is an email address change request from a yellow OpenID, so the
- // email address change must be confirmed with an email message
- if (get_user_by_email($email)) {
- register_error(sprintf(elgg_echo("openid_client:email_in_use"),$email));
- } else {
- $details = openid_client_create_invitation('c',$user->username,$userid,$new_email,$user->name);
- openid_client_send_change_confirmation_message($details);
- system_message(sprintf(elgg_echo("openid_client:change_confirmation"), $email));
- }
- } elseif (!($details = openid_client_get_invitation($i_code))) {
- register_error(elgg_echo("openid_client:invalid_code_error"));
- } else {
- // this is an email address change request from a green OpenID, so the
- // email address change does not need to be confirmed
-
- $email = $details->email;
- $ident = $details->owner;
- if (get_user_by_email($email)) {
- register_error(sprintf(elgg_echo("openid_client:email_in_use"),$email));
- } else {
- $user->email;
- system_message(sprintf(elgg_echo("openid_client:email_updated"),$email));
- }
- }
- }
-
- if ($nosync) {
- $store = new OpenID_ElggStore();
- $store->addNoSyncStatus($user);
- }
-}
-
-forward();