mirror of
https://github.com/netzbegruenung/user_saml.git
synced 2024-05-03 09:33:46 +02:00
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>
This commit is contained in:
parent
a5a406fb1f
commit
4691870887
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue