summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorblizzz <blizzz@owncloud.com>2013-02-10 06:52:03 -0800
committerblizzz <blizzz@owncloud.com>2013-02-10 06:52:03 -0800
commite4c9fc13817202e1faae88352f69ae5c7de49bd5 (patch)
tree01436b5425d4e803c9d52f3a5496ef3a7ab45a25 /lib
parentdc12dd523e450fdb9aa41d845b0cf5cb6d373642 (diff)
parentd8fee28b3becfff155c73395c96d76a0315788a8 (diff)
downloadnextcloud-server-e4c9fc13817202e1faae88352f69ae5c7de49bd5.tar.gz
nextcloud-server-e4c9fc13817202e1faae88352f69ae5c7de49bd5.zip
Merge pull request #1592 from owncloud/display_name_setting
add switch to enable/disable the possibility to change the display name by the user
Diffstat (limited to 'lib')
-rw-r--r--lib/user.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/user.php b/lib/user.php
index 9dc8cca97a6..37b46118889 100644
--- a/lib/user.php
+++ b/lib/user.php
@@ -445,10 +445,12 @@ class OC_User {
* Check whether a specified user can change his display name
*/
public static function canUserChangeDisplayName($uid) {
- foreach(self::$_usedBackends as $backend) {
- if($backend->implementsActions(OC_USER_BACKEND_SET_DISPLAYNAME)) {
- if($backend->userExists($uid)) {
- return true;
+ if (OC_Config::getValue('allow_user_to_change_display_name', true)) {
+ foreach(self::$_usedBackends as $backend) {
+ if($backend->implementsActions(OC_USER_BACKEND_SET_DISPLAYNAME)) {
+ if($backend->userExists($uid)) {
+ return true;
+ }
}
}
}