diff options
Diffstat (limited to 'actions')
-rw-r--r-- | actions/email/save.php | 22 | ||||
-rw-r--r-- | actions/notifications/settings/usersettings/save.php | 6 | ||||
-rw-r--r-- | actions/user/language.php | 4 | ||||
-rw-r--r-- | actions/user/name.php | 4 | ||||
-rw-r--r-- | actions/user/password.php | 6 | ||||
-rw-r--r-- | actions/usersettings/save.php | 21 |
6 files changed, 42 insertions, 21 deletions
diff --git a/actions/email/save.php b/actions/email/save.php index 08fcc7647..79cc40c6d 100644 --- a/actions/email/save.php +++ b/actions/email/save.php @@ -25,19 +25,21 @@ $user = get_entity($user_id); if ($user) - { - $user->email = $email; - if ($user->save()) - { - request_email_validation($user->getGUID()); - system_message(elgg_echo('email:save:success')); + {
+ if ($user->email != $email) { + $user->email = $email; + if ($user->save()) + { + request_email_validation($user->getGUID()); + system_message(elgg_echo('email:save:success')); + } + else + system_message(elgg_echo('email:save:fail'));
} - else - system_message(elgg_echo('email:save:fail')); } else system_message(elgg_echo('email:save:fail')); - forward($_SERVER['HTTP_REFERER']); - exit; + //forward($_SERVER['HTTP_REFERER']); + //exit; ?>
\ No newline at end of file diff --git a/actions/notifications/settings/usersettings/save.php b/actions/notifications/settings/usersettings/save.php index 79970421a..2748a7150 100644 --- a/actions/notifications/settings/usersettings/save.php +++ b/actions/notifications/settings/usersettings/save.php @@ -22,9 +22,9 @@ if (!$result) { system_message(elgg_echo('notifications:usersettings:save:fail')); - forward($_SERVER['HTTP_REFERER']); + //forward($_SERVER['HTTP_REFERER']); - exit; + //exit; } } @@ -33,5 +33,5 @@ else system_message(elgg_echo('notifications:usersettings:save:fail')); - forward($_SERVER['HTTP_REFERER']); + //forward($_SERVER['HTTP_REFERER']); ?>
\ No newline at end of file diff --git a/actions/user/language.php b/actions/user/language.php index f6a815858..f0b91791e 100644 --- a/actions/user/language.php +++ b/actions/user/language.php @@ -35,6 +35,6 @@ else system_message(elgg_echo('user:language:fail')); - forward($_SERVER['HTTP_REFERER']); - exit; + //forward($_SERVER['HTTP_REFERER']); + //exit; ?>
\ No newline at end of file diff --git a/actions/user/name.php b/actions/user/name.php index bbeed85ec..b93c804b3 100644 --- a/actions/user/name.php +++ b/actions/user/name.php @@ -35,6 +35,6 @@ else system_message(elgg_echo('user:name:fail')); - forward($_SERVER['HTTP_REFERER']); - exit; + //forward($_SERVER['HTTP_REFERER']); + //exit; ?>
\ No newline at end of file diff --git a/actions/user/password.php b/actions/user/password.php index 4c7ceb65c..ec3252644 100644 --- a/actions/user/password.php +++ b/actions/user/password.php @@ -43,9 +43,7 @@ else system_message(elgg_echo('user:password:fail:tooshort')); } - else - system_message(elgg_echo('user:password:fail')); - forward($_SERVER['HTTP_REFERER']); - exit; + //forward($_SERVER['HTTP_REFERER']); + //exit; ?>
\ No newline at end of file diff --git a/actions/usersettings/save.php b/actions/usersettings/save.php new file mode 100644 index 000000000..6322369bc --- /dev/null +++ b/actions/usersettings/save.php @@ -0,0 +1,21 @@ +<?php
+ /**
+ * Aggregate action for saving settings
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @copyright Curverider Ltd 2008
+ * @link http://elgg.org/
+ */
+
+ require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
+ global $CONFIG;
+
+ gatekeeper();
+
+ trigger_plugin_hook('usersettings:save','user');
+
+ forward($_SERVER['HTTP_REFERER']);
+
+?>
|