remove audit and sessions

This commit is contained in:
stremovsky
2019-12-10 21:22:57 +02:00
parent 8ede6f2c52
commit 8e653c2f9f

View File

@@ -311,9 +311,13 @@ func (dbobj dbcon) deleteUserRecord(userTOKEN string) (bool, error) {
appNameFull := "app_" + appName
dbobj.deleteRecordInTable(appNameFull, "token", userTOKEN)
}
//delete in audit
dbobj.deleteRecordInTable("audit", "record", userTOKEN)
dbobj.deleteRecordInTable("sessions", "token", userTOKEN)
// cleanup user record
bdel := bson.M{}
bdel["data"] = ""
bdel["key"] = ""
bdel["loginidx"] = ""
bdel["emailidx"] = ""
bdel["phoneidx"] = ""