]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Fixes #3953 adds back the ability to change display name from settings page
authorCash Costello <cash.costello@gmail.com>
Mon, 28 Nov 2011 02:34:41 +0000 (21:34 -0500)
committercash <cash.costello@gmail.com>
Tue, 29 Nov 2011 02:44:02 +0000 (21:44 -0500)
actions/profile/edit.php
views/default/core/settings/account/name.php

index e86053b07441941db9d106f842dd276b385efe62..8ca60f246356564d727c47adb2ee8eea213c44c6 100644 (file)
@@ -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();
        }
 }
 
index 69ffcecaf146ddfa2cc0c090e79d522606a4239f..f719a84deccb9fbe86048ba4b8b95a028156342e 100644 (file)
@@ -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));