Skip to content

fix: record the WordPress login link when creating the group admin account - #37

Merged
vitormattos merged 3 commits into
fix/refuse-adopting-foreign-accountsfrom
fix/record-wordpress-login-link
Nov 14, 2026
Merged

vitormattos merged 3 commits into
fix/refuse-adopting-foreign-accountsfrom
fix/record-wordpress-login-link

Conversation

@YvesCesar

Copy link
Copy Markdown
Member

Depends on #36.

Purpose

The wordpress_login_backend app will require an explicit link between a Nextcloud account and a WordPress login before authenticating that account with WordPress credentials. The link is the user preference wordpress_login_backend / wordpress_login, holding the Nextcloud user ID.

Changes

  • createAdminGroup writes this preference only when it actually creates the group admin account. It is not written when an existing account is reused, in change-admin-email, nor for members created by the group admin, which use the Database backend with a Nextcloud password.
  • Psalm baseline: drop the FalsableReturnStatement entry that Psalm now reports as unused.

The refusal to reuse accounts that do not belong to the group (#36) is what makes this preference trustworthy, so this change depends on it. Existing installations need the linking step of wordpress_login_backend for accounts created before this version.

Verification

  • Psalm, PHP CS Fixer and PHP lint pass locally.
  • The repository has no PHPUnit or Behat suite yet, so this was checked against a local Nextcloud 33 with the app installed: a newly provisioned group admin gets the preference set to its user ID; provisioning an existing group again does not write it.

@vitormattos vitormattos left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI dislike this PR 👀

Signed-off-by: YvesCesar <yvesamorim73@gmail.com>
…count

Signed-off-by: YvesCesar <yvesamorim73@gmail.com>
@YvesCesar
YvesCesar force-pushed the fix/refuse-adopting-foreign-accounts branch from 6e063b4 to 90ab1d3 Compare November 14, 2026 15:20
@YvesCesar
YvesCesar force-pushed the fix/record-wordpress-login-link branch from ace3dd2 to 7c1fa32 Compare November 14, 2026 15:20
@YvesCesar

Copy link
Copy Markdown
Member Author

@vitormattos fixed 😅

…led-users

fix: only enable again the users disabled for billing
@vitormattos
vitormattos merged commit 985f6f9 into fix/refuse-adopting-foreign-accounts Nov 14, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants