add user register IP

This commit is contained in:
skiffer-git
2022-08-19 21:37:39 +08:00
parent dd001ab0e7
commit 5d661f2fc6
4 changed files with 2907 additions and 4567 deletions
@@ -12,6 +12,11 @@ func GetRegister(account, areaCode, userID string) (*db.Register, error) {
userID, "", account, account, areaCode).Take(&r).Error
}
func GetRegisterInfo(userID string) (*db.Register, error) {
var r db.Register
return &r, db.DB.MysqlDB.DefaultGormDB().Table("registers").Where("user_id = ?", userID).Take(&r).Error
}
func SetPassword(account, password, ex, userID, areaCode, ip string) error {
r := db.Register{
Account: account,