Implemented new user registrations
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
package auth
|
||||
|
||||
import "github.com/aerogo/aero"
|
||||
import "github.com/animenotifier/notify.moe/utils"
|
||||
|
||||
// Install ...
|
||||
func Install(app *aero.Application) {
|
||||
@ -10,6 +11,12 @@ func Install(app *aero.Application) {
|
||||
// Logout
|
||||
app.Get("/logout", func(ctx *aero.Context) string {
|
||||
if ctx.HasSession() {
|
||||
user := utils.GetUser(ctx)
|
||||
|
||||
if user != nil {
|
||||
authLog.Info("User logged out", user.ID, ctx.RealIP(), user.Email, user.RealName())
|
||||
}
|
||||
|
||||
ctx.Session().Set("userId", nil)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user