diff options
author | David Reagan <reagand@lanecc.edu> | 2013-04-23 12:45:12 -0700 |
---|---|---|
committer | David Reagan <reagand@lanecc.edu> | 2013-04-23 12:45:12 -0700 |
commit | 7312cbec91e5e034c771ad7a473c744169d449c8 (patch) | |
tree | 29d630c8f3fe631d733fae41e656f2498311bf31 /settings/ajax | |
parent | 99cb37a6d121d2f9907c54ad026b7423e3d5cdd2 (diff) | |
download | nextcloud-server-7312cbec91e5e034c771ad7a473c744169d449c8.tar.gz nextcloud-server-7312cbec91e5e034c771ad7a473c744169d449c8.zip |
Made saving the display name work the same way as the email address. Fixed a few comparison operators. Increased the fadeOut time for the success and error messages.
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..dea07aad14c 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 was 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) ))); |