mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-03-31 20:47:42 +00:00
fix: stop overwriting client_traffics.enable with JSON enable in GetClientTrafficByEmail (#3931)
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.
This commit is contained in:
parent
60abeaad66
commit
7f7ae0c547
1 changed files with 0 additions and 1 deletions
|
|
@ -2032,7 +2032,6 @@ func (s *InboundService) GetClientTrafficByEmail(email string) (traffic *xray.Cl
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
if t != nil && client != nil {
|
if t != nil && client != nil {
|
||||||
t.Enable = client.Enable
|
|
||||||
t.UUID = client.ID
|
t.UUID = client.ID
|
||||||
t.SubId = client.SubID
|
t.SubId = client.SubID
|
||||||
return t, nil
|
return t, nil
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue