summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBjörn Schießle <schiessle@owncloud.com>2013-02-10 14:43:31 +0100
committerBjörn Schießle <schiessle@owncloud.com>2013-02-10 14:43:31 +0100
commitd8fee28b3becfff155c73395c96d76a0315788a8 (patch)
tree240e3ad12c53570dbf10f2d4d8d1dae7c902c99e /lib
parent1c56539c01c162676a05d90e3598b7d68394ac73 (diff)
downloadnextcloud-server-d8fee28b3becfff155c73395c96d76a0315788a8.tar.gz
nextcloud-server-d8fee28b3becfff155c73395c96d76a0315788a8.zip
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;
+ }
}
}
}