aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2011-11-27 21:34:41 -0500
committercash <cash.costello@gmail.com>2011-11-28 21:44:02 -0500
commit4a151030205c2e3bbdf609472627843040270b50 (patch)
treee638c15cc59df20752c92efa62c50cb9dd8c580f
parentc02c507362c9b50a6a7896c7c877bf0f127c819a (diff)
downloadelgg-4a151030205c2e3bbdf609472627843040270b50.tar.gz
elgg-4a151030205c2e3bbdf609472627843040270b50.tar.bz2
Fixes #3953 adds back the ability to change display name from settings page
-rw-r--r--actions/profile/edit.php7
-rw-r--r--views/default/core/settings/account/name.php21
2 files changed, 17 insertions, 11 deletions
diff --git a/actions/profile/edit.php b/actions/profile/edit.php
index e86053b07..8ca60f246 100644
--- a/actions/profile/edit.php
+++ b/actions/profile/edit.php
@@ -62,12 +62,7 @@ if ($name) {
register_error(elgg_echo('user:name:fail'));
} elseif ($owner->name != $name) {
$owner->name = $name;
- // @todo this is weird...giving two notifications?
- if ($owner->save()) {
- system_message(elgg_echo('user:name:success'));
- } else {
- register_error(elgg_echo('user:name:fail'));
- }
+ $owner->save();
}
}
diff --git a/views/default/core/settings/account/name.php b/views/default/core/settings/account/name.php
index 69ffcecaf..f719a84de 100644
--- a/views/default/core/settings/account/name.php
+++ b/views/default/core/settings/account/name.php
@@ -4,12 +4,23 @@
*
* @package Elgg
* @subpackage Core
-
-
*/
$user = elgg_get_page_owner_entity();
-
-// all hidden, but necessary for properly updating user details
-echo elgg_view('input/hidden', array('name' => 'name', 'value' => $user->name));
+?>
+<div class="elgg-module elgg-module-info">
+ <div class="elgg-head">
+ <h3><?php echo elgg_echo('user:name:label'); ?></h3>
+ </div>
+ <div class="elgg-body">
+ <p>
+ <?php echo elgg_echo('name'); ?>:
+ <?php
+ echo elgg_view('input/text', array('name' => 'name', 'value' => $user->name));
+ ?>
+ </p>
+ </div>
+</div>
+<?php
+// need the user's guid to make sure the correct user gets updated
echo elgg_view('input/hidden', array('name' => 'guid', 'value' => $user->guid));