mirror of
https://github.com/optim-enterprises-bv/databunker.git
synced 2026-01-12 19:05:04 +00:00
make sure tempcode exists in user record
This commit is contained in:
@@ -288,8 +288,10 @@ func (e mainEnv) userLoginEnter(w http.ResponseWriter, r *http.Request, ps httpr
|
||||
|
||||
userTOKEN := userBson["token"].(string)
|
||||
event.Record = userTOKEN
|
||||
fmt.Printf("Found user record: %s\n", userBson)
|
||||
tmpCode := userBson["tempcode"].(int32)
|
||||
tmpCode := int32(0)
|
||||
if _, ok := userBson["tempcode"]; ok {
|
||||
tmpCode = userBson["tempcode"].(int32)
|
||||
}
|
||||
if tmp == tmpCode {
|
||||
// user ented correct key
|
||||
// generate temp user access code
|
||||
|
||||
Reference in New Issue
Block a user