summaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2013-02-23 11:39:13 -0800
committerThomas Müller <thomas.mueller@tmit.eu>2013-02-23 11:39:13 -0800
commita417028ccd3f38a0afd85bebb3bea8d6914bb88f (patch)
tree760296c6a39eb16ba7e2182cfce529bf0e3e559e /settings
parent6aa0ecc9b82a5e0a8d1731e76529265ec3489270 (diff)
parentbb75dfc021a68bcd9526ef40f78bca4910798345 (diff)
downloadnextcloud-server-a417028ccd3f38a0afd85bebb3bea8d6914bb88f.tar.gz
nextcloud-server-a417028ccd3f38a0afd85bebb3bea8d6914bb88f.zip
Merge pull request #1862 from owncloud/whitespace-cleanup
Whitespace cleanup
Diffstat (limited to 'settings')
-rw-r--r--settings/ajax/changedisplayname.php62
-rw-r--r--settings/routes.php2
2 files changed, 32 insertions, 32 deletions
diff --git a/settings/ajax/changedisplayname.php b/settings/ajax/changedisplayname.php
index 08c1b1455cd..dff4d733cd2 100644
--- a/settings/ajax/changedisplayname.php
+++ b/settings/ajax/changedisplayname.php
@@ -1,33 +1,33 @@
-<?php
-// Check if we are a user
-
-OCP\JSON::callCheck();
-OC_JSON::checkLoggedIn();
-
-$username = isset($_POST["username"]) ? $_POST["username"] : OC_User::getUser();
-$displayName = $_POST["displayName"];
-
-$userstatus = null;
-if(OC_User::isAdminUser(OC_User::getUser())) {
- $userstatus = 'admin';
-}
-if(OC_SubAdmin::isUserAccessible(OC_User::getUser(), $username)) {
- $userstatus = 'subadmin';
-}
-
-if ($username == OC_User::getUser() && OC_User::canUserChangeDisplayName($username)) {
- $userstatus = 'changeOwnDisplayName';
-}
-
-if(is_null($userstatus)) {
- OC_JSON::error( array( "data" => array( "message" => $l->t("Authentication error") )));
- exit();
-}
-
-// Return Success story
-if( OC_User::setDisplayName( $username, $displayName )) {
- OC_JSON::success(array("data" => array( "username" => $username, 'displayName' => $displayName )));
-}
-else{
+<?php
+// Check if we are a user
+
+OCP\JSON::callCheck();
+OC_JSON::checkLoggedIn();
+
+$username = isset($_POST["username"]) ? $_POST["username"] : OC_User::getUser();
+$displayName = $_POST["displayName"];
+
+$userstatus = null;
+if(OC_User::isAdminUser(OC_User::getUser())) {
+ $userstatus = 'admin';
+}
+if(OC_SubAdmin::isUserAccessible(OC_User::getUser(), $username)) {
+ $userstatus = 'subadmin';
+}
+
+if ($username == OC_User::getUser() && OC_User::canUserChangeDisplayName($username)) {
+ $userstatus = 'changeOwnDisplayName';
+}
+
+if(is_null($userstatus)) {
+ OC_JSON::error( array( "data" => array( "message" => $l->t("Authentication error") )));
+ exit();
+}
+
+// Return Success story
+if( OC_User::setDisplayName( $username, $displayName )) {
+ OC_JSON::success(array("data" => array( "username" => $username, 'displayName' => $displayName )));
+}
+else{
OC_JSON::error(array("data" => array( "message" => $l->t("Unable to change display name"), 'displayName' => OC_User::getDisplayName($username) )));
}
diff --git a/settings/routes.php b/settings/routes.php
index 26d933dba45..b20119b5803 100644
--- a/settings/routes.php
+++ b/settings/routes.php
@@ -39,7 +39,7 @@ $this->create('settings_ajax_removegroup', '/settings/ajax/removegroup.php')
->actionInclude('settings/ajax/removegroup.php');
$this->create('settings_ajax_changepassword', '/settings/ajax/changepassword.php')
->actionInclude('settings/ajax/changepassword.php');
-$this->create('settings_ajax_changedisplayname', '/settings/ajax/changedisplayname.php')
+$this->create('settings_ajax_changedisplayname', '/settings/ajax/changedisplayname.php')
->actionInclude('settings/ajax/changedisplayname.php');
// personel
$this->create('settings_ajax_lostpassword', '/settings/ajax/lostpassword.php')