mirror of
https://github.com/SuiteCRM/SuiteCRM.git
synced 2026-03-02 19:16:58 -05:00
Changing user's email address duplicates email address in DB #5324
Labels
No labels
Area: API
Area: Campaigns
Area: Cases
Area: Clean Up
Area: Clean Up: Performance
Area: Dashlets
Area: Databases
Area: Developer Tools
Area: Elasticsearch
Area: Elasticsearch
Area: Emails
Area: Emails:Campaigns
Area: Emails:Cases
Area: Emails:Compose
Area: Emails:Config
Area: Emails:Templates
Area: Environment
Area: Installation
Area: Language
Area: Mobile
Area: Module
Area: PDFs
Area: PHP8
Area: Reports
Area: Studio
Area: Styling
Area: Upgrading
Area: Workflow
Area:Activity Stream
Area:Calls
Area:Import
Area:Projects
Area:Search
Area:Surveys
Area:Themes
Area:Users
Branch:Hotfix
Good First Issue
Hacktoberfest
Help Wanted
PR:Community Contribution
PR:Type:Enhancement
Priority:Critical
Priority:Important
Priority:Moderate
Severity: Major
Severity: Minor
Severity: Moderate
Status: Requires Code Review
Status: Requires Updates
Status: Stale
Status: Team Investigating
Status:Assessed
Status:Fix Proposed
Status:Needs Assessed
Status:Requires Automated Tests
Type: Bug
Type:Deprecated
Type:Discussion
Type:Duplicate
Type:Invalid
Type:Question
Type:Suggestion
Type:Suggestion
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/SuiteCRM-SuiteCRM#5324
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @azzy9 on GitHub (May 20, 2025).
Issue
Brought to my attention by user @SinergiaCRM.
Due to me fixing the issue #10433 with PR #10434,
The unintended result is that the user updates the email address in the DB as well as creating and relating the new email address, this results in a duplicate record in the email_addresses table.
Possible Fix
The logic should either be replacing the email address or creating and relating a new email address. Not both.
can stop replacing the old email by removing query at:
SugarEmailAddress.php#L471
Steps to Reproduce the Issue
Context
This issue is present in v7 & v8.
Since before the fix, the MySQL query was not functioning so the query never ran.
Version
8.8.0
What browser are you currently using?
Chrome
Browser Version
Chrome
Environment Information
PHP 8.1
Operating System and Version
Ubuntu 24.04
@azzy9 commented on GitHub (May 20, 2025):
I would make a PR with the query at SugarEmailAddress.php#L471 removed.
I know this fixes the issue in SuiteCRM 8.8.0,
but I am unable to test it on v7.14.6 as I do not have a test installation of it.
@SinergiaCRM commented on GitHub (May 20, 2025):
We tested and it works.
@azzy9 , thanks.
@azzy9 commented on GitHub (May 20, 2025):
Thanks @SinergiaCRM,
I have made a PR