Skip to content

Conversation

@backportbot
Copy link

@backportbot backportbot bot commented Apr 3, 2025

Backport of #51745

Warning, This backport's changes differ from the original and might be incomplete ⚠️

Todo

  • Review and resolve any conflicts
  • Remove all the empty commits

Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

@backportbot backportbot bot added bug 3. to review Waiting for reviews labels Apr 3, 2025
@backportbot backportbot bot added this to the Nextcloud 29.0.15 milestone Apr 3, 2025
$allowDisplayNameChange = $this->config->getSystemValue('allow_user_to_change_display_name', true);
if ($allowDisplayNameChange === true && (
$targetUser->getBackend() instanceof ISetDisplayNameBackend
|| $targetUser->getBackend()->implementsActions(Backend::SET_DISPLAYNAME)

Check notice

Code scanning / Psalm

PossiblyNullReference Note

Cannot call method implementsActions on possibly null value
$allowDisplayNameChange = $this->config->getSystemValue('allow_user_to_change_display_name', true);
if ($allowDisplayNameChange === true && (
$targetUser->getBackend() instanceof ISetDisplayNameBackend
|| $targetUser->getBackend()->implementsActions(Backend::SET_DISPLAYNAME)

Check notice

Code scanning / Psalm

DeprecatedMethod Note

The method OCP\UserInterface::implementsActions has been marked as deprecated
$allowDisplayNameChange = $this->config->getSystemValue('allow_user_to_change_display_name', true);
if ($allowDisplayNameChange !== false && (
$targetUser->getBackend() instanceof ISetDisplayNameBackend
|| $targetUser->getBackend()->implementsActions(Backend::SET_DISPLAYNAME)

Check notice

Code scanning / Psalm

PossiblyNullReference Note

Cannot call method implementsActions on possibly null value
$allowDisplayNameChange = $this->config->getSystemValue('allow_user_to_change_display_name', true);
if ($allowDisplayNameChange !== false && (
$targetUser->getBackend() instanceof ISetDisplayNameBackend
|| $targetUser->getBackend()->implementsActions(Backend::SET_DISPLAYNAME)

Check notice

Code scanning / Psalm

DeprecatedMethod Note

The method OCP\UserInterface::implementsActions has been marked as deprecated
@susnux susnux force-pushed the backport/51745/stable29 branch from c213284 to b0a948e Compare April 3, 2025 06:37
@susnux susnux marked this pull request as ready for review April 3, 2025 06:37
$accountParameters = [
'avatarChangeSupported' => $user->canChangeAvatar(),
'displayNameChangeSupported' => $user->canChangeDisplayName(),
'emailChangeSupported' => $user->canChangeEmail(),

Check notice

Code scanning / Psalm

UndefinedInterfaceMethod Note

Method OCP\IUser::canChangeEmail does not exist
provokateurin and others added 2 commits April 3, 2025 08:49
…y name change restriction

Co-authored-by: provokateurin <kate@provokateurin.de>
Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de>
Co-authored-by: Louis <louis@chmn.me>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
@susnux susnux force-pushed the backport/51745/stable29 branch from b0a948e to f1e3312 Compare April 3, 2025 06:49
@susnux
Copy link
Contributor

susnux commented Apr 3, 2025

/compile

Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
@Altahrim Altahrim mentioned this pull request Apr 3, 2025
7 tasks
@susnux susnux merged commit c5a8fae into stable29 Apr 3, 2025
212 of 224 checks passed
@susnux susnux deleted the backport/51745/stable29 branch April 3, 2025 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants