Users Details
這裡放 users / user_* 已深入調查或已搬移的 API。
已深入調查
| API | 文件 | 狀態 |
|---|---|---|
POST /users/login.json | login.md | 已補 legacy JSON path parity、同 device token rotation decision 與 PHPUnit;staging rotation / full diff 待補 |
POST /users/login_once.json | login_once.md | 已補 legacy parity guard / fallback 與 PHPUnit;已做 staging happy / consumed 實測,完整 diff 待補 |
POST /users/forgot_password.json | forgot_password.md | 已補 action / PHPUnit / staging diff |
POST /users/sign_up.json | sign_up.md | 已補 action / PHPUnit;已做 staging qna path 實測,完整 social token diff 待補 |
POST /users/delete.json | delete.md | 已補 action / routing / PHPUnit;new staging DB side effect 已驗證,legacy full diff 待補 |
POST /users/change_password.json | change_password.md | 已補 action / routing / PHPUnit;2026-07-03 staging curl / DB / log 已驗證 |
POST /users/update_auto_refill.json | update_auto_refill.md | 已補 action / routing / PHPUnit;legacy / new staging success path 已驗證 |
POST /users/connect_social/{type}.json | connect_social.md | 已補 action / routing / PHPUnit;2026-07-08 new staging Google / Apple 已驗證,Facebook 真實 token 待補 |
GET /users/referrals.json | referrals.md | 已補 action / routing / PHPUnit;new staging 實測待補 |
POST /users/refer.json | refer.md | 已補 action / routing / PHPUnit;推薦好友 email API,staging 實測待補 |
POST /users/verify/phone/preauth.json | verify/phone_preauth.md | 已補 action / route / model / PHPUnit;new staging Infobip delivery 已驗證 |
POST /users/verify/phone/auth.json | verify/phone_auth.md | 已補 action / route / user/referral/abnormal side effect / PHPUnit;new staging logged-in auth 已驗證 |
POST /users/verify/voice/preauth.json | verify/voice_preauth.md | 已補 route / voice provider path / duplicate guard / PHPUnit;真實 voice 實測待補 |
目前同步狀態
login:2026-06-30 已補 Google / Facebook Limited / Apple transfer fallback、UserProfile.user_idresponse、email OTP consume flat id、login_logs、user_login_infos、response allowlist、CakeCookie[user_language]/il=1/pro360_u_s_tokencookie、last-login、mobile_app_time_modified、active guard、device-id 無密碼失敗與undefined分支。2026-07-21 reviewer 接受非 legacy migration decision:同user_id + device_id成功重登會 archive 舊 token 到api_session_logs(action=login_rotate)並建立新 token;其他 device / shared caller 不變。staging rotation / full diff 待補。login_once:2026-06-29 已補 active user guard、Session hash 14 天 / fulfilled consumed guard、fulfilled shop login consumed guard、nestedUser.device_idfallback;只改Users::login_once(),未改 sharedSecurityHashmodel。staging 已驗證 happy path、二次 consumed 與主要 DB side effect。forgot_password:已對齊 legacy JSON path、response、mobile_app_hash、User_Change_Passwordqueue payload;request log 只保留RouterV3generic log,不補 endpoint duplicate full request log。sign_up:已補 consumer 註冊 action、insert allowlist、phone/session/activity/welcome event side effect 與 negative tests;已做 staging qna path 實測,完整 social token diff 待補。delete:2026-07-01 已補 action / routing / PHPUnit;此 API 會連動 users、quote_services、quote_requests、quote_activities、api_sessions、nshop、task/event queue、Life55688,不可只做users.is_active = 0。request log 只保留RouterV3generic log,不補 endpoint duplicate full request log。new staging DB side effect 已驗證,legacy full diff 待補。change_password:2026-07-03 已補 action / routing / PHPUnit,並完成 staging curl / DB / log 驗證;JSON path 實際轉change_password_from_api(),成功主流程更新users.password,不走 web/admin logout/email 分支。session helper 保留 legacy access 更新與returnedQuoteService條件式 task queue;request log 保留 RouterV3 generic log,password/passwd key 會過濾。update_auto_refill:已補 action / routing / PHPUnit;legacy 主流程只更新users.auto_refill_package_id與modified,不直接刷卡、不寫 transaction / event queue。legacy / new staging success path 已驗證。connect_social:2026-07-06 已補 action / routing / PHPUnit;保留 social id conflict、empty-only update、legacy response 與 session helper side effect。2026-07-08 已完成 new staging Google / Apple success / conflict 實測,Facebook normal / limited login 真實 token 待補;request log migration decision 是只保留 RouterV3 generic log。referrals:2026-07-08 已補 action / routing / PHPUnit;legacy log 有GET /users/referrals.json流量。此 API 只讀 referral list,不處理寄信,寄信是另一支POST /users/refer.json。實際頁面是/dashboard/free-credits/referral。refer:2026-07-09 已補 action / routing / PHPUnit;此 API 只寄推薦 email,成功時寫Invite_Referralevent queue,不新增user_referrals。verify:phone SMS / logged-in auth 已在 new staging 驗證;voice 與 downstream 待補。詳見 verify index。activation:2026-07-14 查全部保留的 legacyget-lancer_access.log*為 0 筆,暫緩搬移。