Repository navigation
feat: add a command to link existing group owners to their WordPress login - #29
Merged
Merged
Conversation
…login Signed-off-by: YvesCesar <yvesamorim73@gmail.com>
vitormattos
approved these changes
Nov 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was wrong
The backend treats a Nextcloud account and a WordPress user as the same person only because the uid and the
user_loginhave the same text. To require an explicit link (see the follow-up PR), the accounts provisioned before that need to be linked, otherwise their owners can no longer log in with the WordPress password.What changed
occ wordpress-login-backend:link-users [--dry-run].wordpress_loginof this app to the account uid, which is the same mark Admin Group Manager records when it creates a group owner.user_login(a matching e-mail does not count). Group members are never linked and are listed as skipped.--dry-runlists the accounts that would be linked and the skipped ones without writing anything.Merge order
This PR has to be merged and the command run before (or together with) the PR that makes the link required, so existing customers keep logging in.
How it was verified
--dry-runwrites nothing.composer run lint,composer run test:unitand theinfo.xmlschema check pass locally.--dry-runlisted a test group owner as linked and its member as skipped.