Files
bssapp/svc/queries/user_password.go
2026-02-11 17:46:22 +03:00

42 lines
686 B
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package queries
// ======================================================
// 🔐 UPDATE USER PASSWORD (RESET / CHANGE)
// ======================================================
const UpdateUserPassword = `
UPDATE dfusr
SET
upass = $2,
last_updated_date = NOW()
WHERE id = $1
AND is_active = true
`
// Reset token yaz
const SetUserResetToken = `
UPDATE dfusr
SET
fpass = $2,
fpass_id = NOW()
WHERE id = $1
AND is_active = true
`
// Reset token kontrol
const CheckUserResetToken = `
SELECT id
FROM dfusr
WHERE
fpass = $1
AND is_active = true
`
// Reset sonrası temizle
const ClearUserResetToken = `
UPDATE dfusr
SET
fpass = NULL,
fpass_id = NULL
WHERE id = $1
`