Users Details

這裡放 users / user_* 已深入調查或已搬移的 API。

已深入調查

API文件狀態
POST /users/login.jsonlogin.md已補 legacy JSON path parity、同 device token rotation decision 與 PHPUnit;staging rotation / full diff 待補
POST /users/login_once.jsonlogin_once.md已補 legacy parity guard / fallback 與 PHPUnit;已做 staging happy / consumed 實測,完整 diff 待補
POST /users/forgot_password.jsonforgot_password.md已補 action / PHPUnit / staging diff
POST /users/sign_up.jsonsign_up.md已補 action / PHPUnit;已做 staging qna path 實測,完整 social token diff 待補
POST /users/delete.jsondelete.md已補 action / routing / PHPUnit;new staging DB side effect 已驗證,legacy full diff 待補
POST /users/change_password.jsonchange_password.md已補 action / routing / PHPUnit;2026-07-03 staging curl / DB / log 已驗證
POST /users/update_auto_refill.jsonupdate_auto_refill.md已補 action / routing / PHPUnit;legacy / new staging success path 已驗證
POST /users/connect_social/{type}.jsonconnect_social.md已補 action / routing / PHPUnit;2026-07-08 new staging Google / Apple 已驗證,Facebook 真實 token 待補
GET /users/referrals.jsonreferrals.md已補 action / routing / PHPUnit;new staging 實測待補
POST /users/refer.jsonrefer.md已補 action / routing / PHPUnit;推薦好友 email API,staging 實測待補
POST /users/verify/phone/preauth.jsonverify/phone_preauth.md已補 action / route / model / PHPUnit;new staging Infobip delivery 已驗證
POST /users/verify/phone/auth.jsonverify/phone_auth.md已補 action / route / user/referral/abnormal side effect / PHPUnit;new staging logged-in auth 已驗證
POST /users/verify/voice/preauth.jsonverify/voice_preauth.md已補 route / voice provider path / duplicate guard / PHPUnit;真實 voice 實測待補

目前同步狀態

  • login:2026-06-30 已補 Google / Facebook Limited / Apple transfer fallback、UserProfile.user_id response、email OTP consume flat id、login_logsuser_login_infos、response allowlist、CakeCookie[user_language] / il=1 / pro360_u_s_token cookie、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、nested User.device_id fallback;只改 Users::login_once(),未改 shared SecurityHash model。staging 已驗證 happy path、二次 consumed 與主要 DB side effect。
  • forgot_password:已對齊 legacy JSON path、response、mobile_app_hashUser_Change_Password queue payload;request log 只保留 RouterV3 generic 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 只保留 RouterV3 generic 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_idmodified,不直接刷卡、不寫 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_Referral event queue,不新增 user_referrals
  • verify:phone SMS / logged-in auth 已在 new staging 驗證;voice 與 downstream 待補。詳見 verify index
  • activation:2026-07-14 查全部保留的 legacy get-lancer_access.log* 為 0 筆,暫緩搬移。