Automattic / Automattic/gravatar

Changing primary email in Gravatar breaks WordPress.com account linkage

Open
#234 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
361
Forks
125
PR merge metrics
No merged PRs in 30d

Description

# Bug Report

## Description / Observed Behavior

What kind of issues did you encounter?

A Gravatar profile can have multiple emails added to it, and a single WordPress site can also register multiple user accounts with different emails.

However, when running a **self-hosted WordPress site**, only **one** of those accounts can be connected to a single WordPress.com account.

On a **WordPress.com-hosted site**, if you create two accounts using different email addresses and then change the **primary email** on your Gravatar profile, the WordPress.com account becomes **split**, and the **access permissions** across associated sites or services become inconsistent and broken.

This causes serious identity management and synchronization issues across the Automattic ecosystem (WordPress.com ↔ Gravatar ↔ Jetpack).

## Expected Behavior

How did you expect the component or service to behave here?

Email changes in Gravatar should **not break WordPress.com account linkage** or create duplicated / separated accounts.
Ideally, Gravatar identity should be based on a **persistent handle (e.g., ActivityPub handle or user ID)** rather than an email address.

## Repro Steps / Code Example

Share the steps to reproduce the issue, screenshots, or a [CodeSandbox](https://codesandbox.io) link is also appreciated!

1. Create a WordPress.com account with Email A.
2. Add Email A and Email B to the same Gravatar profile.
3. Create another account on WordPress.com (or a WordPress.com-hosted site) using Email B.
4. Change the **primary email** on Gravatar from Email A to Email B.
5. Observe that the WordPress.com accounts are now **split** and **permissions become inconsistent**.

## Your Environment

* **Component/Service:** Gravatar / WordPress.com account linkage
* **Platform:** Web
* **Browser:** Any (tested on Chrome and Edge, latest)
* **Environment:** WordPress.com + Self-hosted WordPress (Jetpack-connected)

## Additional Information

Any other information about the problem here.

This problem reveals a fundamental flaw in using **email addresses as identity keys** across services.
Transitioning Gravatar identity to an **ActivityPub handle or unified WordPress.com ID system** would provide a more reliable and modern solution.

Reference: [[Gravatar Support – Email Avatars Are Not Showing](https://support.gravatar.com/avatars/email-avatars-are-not-showing/)](https://support.gravatar.com/avatars/email-avatars-are-not-showing/)

---

- https://github.com/Automattic/wordpress-activitypub/discussions/2321
- https://github.com/Automattic/wordpress-activitypub/issues/1804#issuecomment-3405820860

---

My account settings have become completely messed up.

1. I cannot access my WordPress.com-hosted site using my WordPress.com account on **mobile browsers**.
2. There should only be **two users** on the site — my main account and one secondary backup account — but the total user count shows **three**. It seems there’s an issue with the **wp_users** database.
3. The accounts appear to have been **abnormally split**, and access permissions are now broken.

---

### Site Migration Details

**From:**
`travel-in-busan.com` (self-hosted)
Admin email: `xhkdnakwpdls@naver.com`
Author ID: `1`
Username: `thaumiel999`
Name: Jiwoon
Surname: Kim
Nickname: 김지운
Display name: Jiwoon Kim
Email: `thaumiel999@naver.com`
Website: `https://travel-in-busan.com`
ActivityPub handle: `@thaumiel999@travel-in-busan.com`
Jetpack WordPress.com account connected
Connected as owner: Jiwoon Kim (`kimjiwoon75@gmail.com`)

**To:**
`designbusan.ai.kr` (WordPress.com-hosted)
Admin email: `kimjiwoon75@gmail.com`
Author ID: `241264574`
Username: `/author/kimjiwoon96/`
Profile: `https://wordpress.com/reader/users/kimjiwoon96`
Name: 지운
Surname: 김
Public name: Jiwoon Kim
Email: `kimjiwoon75@gmail.com`
Public URL: `https://designbusan.ai.kr`
ActivityPub handle: `@kimjiwoon96@designbusan.ai.kr`

**Intent:**
My public social ID has always been **thaumiel999**, so I wanted to change my ActivityPub handle to `@thaumiel999@designbusan.ai.kr`.
I also registered a sub-account as a backup in case of emergencies.

---

### Logs

**Gravatar:** [https://gravatar.com/kimjiwoon96](https://gravatar.com/kimjiwoon96)
Connected emails:
- `kimjiwoon75@gmail.com`
- `thaumiel999@naver.com` (primary)
- `xhkdnakwpdls@naver.com`
- `kimjiwoon@chat.wordpress.org`

**Staging:**
`designbusan.wpcomstaging.com`
- Username: `kimjiwoon96` → Email: `thaumiel999@naver.com`
- Username: `thaumiel999` → Email: `kimjiwoon75@gmail.com`

**Timeline:**
- **Oct 13, 10:34 PM** — Domain registered: `designbusan.ai.kr`
- **Oct 14** — Changed Gravatar primary email:
→ from `thaumiel999@naver.com`
→ to `kimjiwoon75@gmail.com` (now primary)
- Deleted user `thaumiel999` from `designbusan.ai.kr`
- Reinvited user `thaumiel999@naver.com` via
[https://wordpress.com/people/invites/designbusan.ai.kr/](https://wordpress.com/people/invites/designbusan.ai.kr/)
Added by: Jiwoon Kim @kimjiwoon96
Invite date: Oct 14, 2025, 1:52 AM

---

### Bug Details

- On **https://designbusan.ai.kr/**, the admin bar correctly displays my user as **kimjiwoon96**
→ [https://wordpress.com/reader/users/kimjiwoon96](https://wordpress.com/reader/users/kimjiwoon96)
However, when I click my WordPress.com profile, it redirects to
→ [https://wordpress.com/reader/users/thaumiel999](https://wordpress.com/reader/users/thaumiel999)

- On `wordpress.com/me/account`, the **thaumiel999** account email is listed as `thaumiel999@naver.com`,
but signing in with Google (using `kimjiwoon75@gmail.com`) connects me to that same account.
As a result, I can’t access the **kimjiwoon96** account properly.

- After resetting my Gravatar, I was able to temporarily access the **kimjiwoon96** account,
but now the two WordPress.com accounts have become fully **separated**:
- `kimjiwoon96` → `kimjiwoon75@gmail.com`
- `thaumiel999` → `thaumiel999@naver.com`

I disconnected the **thaumiel999 WordPress.com account** (linked with Google login via `kimjiwoon75@gmail.com`) and reconnected it to my main account **kimjiwoon96**.
On desktop, login to **designbusan.ai.kr** via WordPress.com now works correctly.
However, on **mobile** (both Chrome and Edge), login via WordPress.com **fails**.

Because of this bug, when I open
→ `https://designbusan.ai.kr/wp-admin/users.php`,
only **two users** are displayed, but the **admin count shows three**.

The original site `travel-in-busan.com` (soon to be decommissioned)
has the main account **thaumiel999 (email: thaumiel999@naver.com)**,
but Jetpack lists it as:
> Connected as owner: Jiwoon Kim (kimjiwoon75@gmail.com)

So the **Gravatar hovercard** pulls data from
→ `https://gravatar.com/thaumiel999`,
while the account connection points to
→ `https://gravatar.com/kimjiwoon96`.

---

### Summary

I've been continuously trying to resolve the issue on my own.
I have matched the **site admin email** with my **main account email**, but the **user count issue remains unresolved**.

To summarize:
- The site currently shows **3 users**, but there should only be **2**.
- Login via WordPress.com on **mobile browsers** does not work, while desktop login works fine.
- Account connections and permissions appear to have been broken during the migration process.

Contributor guide

Open the contributing guide

Research direction

No source file, test, or entry point is identified. Start by reproducing the Gravatar, WordPress.com, and Jetpack account-linkage flow, including the reported mobile login behavior, and inspect the affected wp_users state. Done would require persistent account linkage after a Gravatar primary-email change, consistent permissions, and no unexplained duplicate user.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, wordpress
Domain
authentication, authorization
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.