Skip to content

fix: updating existing account clashes with itself - #14305

Open
madbob wants to merge 1 commit into
nextcloud:mainfrom
madbob:updating_existing_account
Open

madbob wants to merge 1 commit into
nextcloud:mainfrom
madbob:updating_existing_account

Conversation

@madbob

@madbob madbob commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator

Context

Fixes an issue introduced in 0a13cd1 (by me...).

Approach

SetupService::createNewAccount() is called both creating and updating an account, and in both cases checks for existance of a previous account for the given email address. But while updating, of course, it is expected to find it, and should not fail.

Testing

  1. create an account
  2. go to Account Settings and try to change any parameter in the "Mail Server" section
  3. receive a "Account already exists" error notice

I've also added two unit tests, to check both update of an existing account (should work) and update of a different account but configured with the same email address (should fail).

@DerDreschner DerDreschner 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.

LGTM, but psalm wants a small change to be happy 😄

Signed-off-by: Roberto Guido <info@madbob.org>
@madbob
madbob force-pushed the updating_existing_account branch from 3cdef1f to 02678a3 Compare November 26, 2026 11:54

This branch has not been deployed

No deployments
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