diff options
Diffstat (limited to 'settings/ajax/changedisplayname.php')
-rw-r--r-- | settings/ajax/changedisplayname.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/settings/ajax/changedisplayname.php b/settings/ajax/changedisplayname.php index f80ecb7a0c9..766f1459aec 100644 --- a/settings/ajax/changedisplayname.php +++ b/settings/ajax/changedisplayname.php @@ -1,5 +1,6 @@ <?php
// Check if we are a user
+
OCP\JSON::callCheck();
OC_JSON::checkLoggedIn();
@@ -21,8 +22,8 @@ if(is_null($userstatus)) { // Return Success story
if( OC_User::setDisplayName( $username, $displayName )) {
- OC_JSON::success(array("data" => array( "username" => $username )));
+ OC_JSON::success(array("data" => array( "username" => $username, 'displayName' => $displayName )));
}
else{
- OC_JSON::error(array("data" => array( "message" => "Unable to change display name" )));
+ OC_JSON::error(array("data" => array( "message" => "Unable to change display name", displayName => OC_User::getDisplayName($username) )));
}
\ No newline at end of file |