[PR #3931] [MERGED] fix: stop overwriting client_traffics.enable with JSON enable in GetC… #5559

Closed
opened 2026-10-31 20:47:49 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/MHSanaei/3x-ui/pull/3931
Author: @Alimpo
Created: 3/16/2026
Status: ✅ Merged
Merged: 3/17/2026
Merged by: @MHSanaei

Base: main ← Head: fix-reset-reenable-qoutadisabled-configs


📝 Commits (1)

  • 70a9a08 fix: stop overwriting client_traffics.enable with JSON enable in GetClientTrafficByEmail

📊 Changes

1 file changed (+0 additions, -1 deletions)

View changed files

📝 web/service/inbound.go (+0 -1)

📄 Description

What is the pull request?

Fix client traffic reset for quota-disabled clients by preserving the DB runtime enable flag in GetClientTrafficByEmail.

When a client hit traffic/expiry limit, disableInvalidClients sets client_traffics.enable=false and removes the user from Xray. GetClientTrafficByEmail was overwriting that with settings.clients[].enable (admin config), so ResetClientTraffic never saw the client as disabled and did not re-add the user. Clients could not connect until manually disabled/re-enabled. Now the DB runtime enable flag is preserved; reset correctly re-adds the user to Xray.

Which part of the application is affected by the change?

  • Frontend
  • Backend

Type of Changes

  • Bug fix
  • New feature
  • Refactoring
  • Other

Screenshots

N/A — backend-only logic fix; no UI change.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/MHSanaei/3x-ui/pull/3931 **Author:** [@Alimpo](https://github.com/Alimpo) **Created:** 3/16/2026 **Status:** ✅ Merged **Merged:** 3/17/2026 **Merged by:** [@MHSanaei](https://github.com/MHSanaei) **Base:** `main` ← **Head:** `fix-reset-reenable-qoutadisabled-configs` --- ### 📝 Commits (1) - [`70a9a08`](https://github.com/MHSanaei/3x-ui/commit/70a9a0879c7abe66d258bc8207f340c8526d85df) fix: stop overwriting client_traffics.enable with JSON enable in GetClientTrafficByEmail ### 📊 Changes **1 file changed** (+0 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `web/service/inbound.go` (+0 -1) </details> ### 📄 Description ## What is the pull request? Fix client traffic reset for quota-disabled clients by preserving the DB runtime `enable` flag in `GetClientTrafficByEmail`. When a client hit traffic/expiry limit, `disableInvalidClients` sets `client_traffics.enable=false` and removes the user from Xray. `GetClientTrafficByEmail` was overwriting that with `settings.clients[].enable` (admin config), so `ResetClientTraffic` never saw the client as disabled and did not re-add the user. Clients could not connect until manually disabled/re-enabled. Now the DB runtime enable flag is preserved; reset correctly re-adds the user to Xray. ## Which part of the application is affected by the change? - [ ] Frontend - [x] Backend ## Type of Changes - [x] Bug fix - [ ] New feature - [ ] Refactoring - [ ] Other ## Screenshots N/A — backend-only logic fix; no UI change. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 20:47:49 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#5559
No description provided.