{"record":{"id":"204eddf76bead64d","repo":"XTLS/Xray-core","slug":"user-s-not-found","errorCode":null,"errorMessage":"User %s not found.","messagePattern":"User (.+?) not found\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"proxy/shadowsocks_2022/inbound_multi.go","lineNumber":136,"sourceCode":"// RemoveUser implements proxy.UserManager.RemoveUser().\nfunc (i *MultiUserInbound) RemoveUser(ctx context.Context, email string) error {\n\tif email == \"\" {\n\t\treturn errors.New(\"Email must not be empty.\")\n\t}\n\n\ti.Lock()\n\tdefer i.Unlock()\n\n\tidx := -1\n\tfor ii, u := range i.users {\n\t\tif strings.EqualFold(u.Email, email) {\n\t\t\tidx = ii\n\t\t\tbreak\n\t\t}\n\t}\n\n\tif idx == -1 {\n\t\treturn errors.New(\"User \", email, \" not found.\")\n\t}\n\n\tulen := len(i.users)\n\n\ti.users[idx] = i.users[ulen-1]\n\ti.users[ulen-1] = nil\n\ti.users = i.users[:ulen-1]\n\n\t// sync to multi service\n\t// Considering implements shadowsocks2022 in xray-core may have better performance.\n\ti.service.UpdateUsersWithPasswords(\n\t\tC.MapIndexed(i.users, func(index int, it *protocol.MemoryUser) int { return index }),\n\t\tC.Map(i.users, func(it *protocol.MemoryUser) string { return it.Account.(*MemoryAccount).Key }),\n\t)\n\n\treturn nil\n}\n","sourceCodeStart":118,"sourceCodeEnd":154,"githubUrl":"https://github.com/XTLS/Xray-core/blob/7d214f8b094f75322fa3990f8aadad1c912f24f5/proxy/shadowsocks_2022/inbound_multi.go#L118-L154","documentation":"Error \"User %s not found.\" thrown in XTLS/Xray-core.","triggerScenarios":"Thrown at proxy/shadowsocks_2022/inbound_multi.go:136 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7d214f8b094f75322fa3990f8aadad1c912f24f5","analyzedAt":"2026-08-15T14:26:24.325Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}