nextcloud / nextcloud/server

`occ user:sync-account-data` without function

Open
#57,482 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage 33-feedback bug
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

The command occ user:sync-account-data currently updates the displayname, when the backend implements IGetDisplayNameBackend:

https://github.com/nextcloud/server/blob/d341c2011f3913f74184228c83d874e26f18809c/core/Command/User/SyncAccountDataCommand.php#L58-L75

But the account data that is used to compare the displayname, always return the up-to-date displayname:

https://github.com/nextcloud/server/blob/d341c2011f3913f74184228c83d874e26f18809c/lib/private/Accounts/AccountManager.php#L664-L667

(implemented at https://github.com/nextcloud/server/pull/39770)

So if I am not mistaken, occ user:sync-account-data is basically a NOP?

CC @juliusknorr as creator of the occ command.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read core/Command/User/SyncAccountDataCommand.php around lines 58-75 and lib/private/Accounts/AccountManager.php around lines 664-667, then reproduce the display-name comparison with occ user:sync-account-data. Confirm whether the command is a no-op and define completion as synchronizing account data correctly, with the behavior verified by appropriate coverage.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend, cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.