Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/user_saml.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2017-07-31 17:58:51 +0300
committerLukas Reschke <lukas@statuscode.ch>2017-07-31 17:58:51 +0300
commit4691870887e1af75772ffd4f686425cc76860b96 (patch)
treeb171d66f338c17c9b976dcca67a75c6f8b7cc959 /lib/UserBackend.php
parenta5a406fb1fcbf8f7467d7acf13c76899b331da79 (diff)
Don't advertise ability to change display name
Otherwise users can change their display name and email address which is in a SAML scenario undesired. Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Diffstat (limited to 'lib/UserBackend.php')
-rw-r--r--lib/UserBackend.php3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/UserBackend.php b/lib/UserBackend.php
index 67e244ce..5d8e14b3 100644
--- a/lib/UserBackend.php
+++ b/lib/UserBackend.php
@@ -117,7 +117,6 @@ class UserBackend implements IApacheBackend, UserInterface, IUserBackend {
public function implementsActions($actions) {
$availableActions = \OC\User\Backend::CHECK_PASSWORD;
$availableActions |= \OC\User\Backend::GET_DISPLAYNAME;
- $availableActions |= \OC\User\Backend::SET_DISPLAYNAME;
return (bool)($availableActions & $actions);
}
@@ -456,7 +455,7 @@ class UserBackend implements IApacheBackend, UserInterface, IUserBackend {
$currentDisplayname = (string)$this->getDisplayName($uid);
if($newDisplayname !== null
&& $currentDisplayname !== $newDisplayname) {
- $user->setDisplayName($newDisplayname);
+ $this->setDisplayName($uid, $newDisplayname);
}
}
}