diff options
author | Morris Jobke <morris.jobke@gmail.com> | 2013-04-26 01:10:16 +0400 |
---|---|---|
committer | Morris Jobke <morris.jobke@gmail.com> | 2013-04-26 01:10:16 +0400 |
commit | e6f84397aa87b8e50538197ddab44e5cd6380a90 (patch) | |
tree | 6c753058b7fd046b2ca5afd7a006263c8fb0a6e6 /settings/ajax | |
parent | 80e91e1ac6f8c3c3daa0b8e65ab038ebb57b0794 (diff) | |
parent | 4bee02f75cdd73c1f95f5d84ba8143ec812f1315 (diff) |
Merge pull request #3098 from jerrac/displaynamesaveontimeout
On the Personal Settings page, made the display name save like the email address saves
Diffstat (limited to 'settings/ajax')
-rw-r--r-- | settings/ajax/changedisplayname.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/settings/ajax/changedisplayname.php b/settings/ajax/changedisplayname.php index dff4d733cd2..faf962fbdd7 100644 --- a/settings/ajax/changedisplayname.php +++ b/settings/ajax/changedisplayname.php @@ -4,6 +4,8 @@ OCP\JSON::callCheck(); OC_JSON::checkLoggedIn(); +$l=OC_L10N::get('core'); + $username = isset($_POST["username"]) ? $_POST["username"] : OC_User::getUser(); $displayName = $_POST["displayName"]; @@ -26,7 +28,7 @@ if(is_null($userstatus)) { // Return Success story if( OC_User::setDisplayName( $username, $displayName )) { - OC_JSON::success(array("data" => array( "username" => $username, 'displayName' => $displayName ))); + OC_JSON::success(array("data" => array( "message" => $l->t('Your display name has been changed.'), "username" => $username, 'displayName' => $displayName ))); } else{ OC_JSON::error(array("data" => array( "message" => $l->t("Unable to change display name"), 'displayName' => OC_User::getDisplayName($username) ))); |