- replace literal 'admin' with const
This commit is contained in:
@@ -60,7 +60,7 @@ func (a *Auther) ChangePassword(userID, oldPassMD5, newPassMD5 string) (err erro
|
||||
_, err = dao.UpdateEntityLogically(db, authBind, map[string]interface{}{
|
||||
"AuthSecret": encryptPwd,
|
||||
"AuthSecret2": salt,
|
||||
}, "admin", nil)
|
||||
}, model.AdminName, nil)
|
||||
}
|
||||
} else if dao.IsNoRowsError(err) {
|
||||
err = a.AddAuthBind(&auth2.AuthBindEx{
|
||||
@@ -71,7 +71,7 @@ func (a *Auther) ChangePassword(userID, oldPassMD5, newPassMD5 string) (err erro
|
||||
AuthSecret: encryptPwd,
|
||||
AuthSecret2: salt,
|
||||
},
|
||||
}, "admin")
|
||||
}, model.AdminName)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user