mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-04-19 21:42:24 +00:00
some changes
This commit is contained in:
parent
9ff7f14b6e
commit
24b9e5bfa3
1 changed files with 3 additions and 3 deletions
|
@ -70,7 +70,7 @@ func (a *IndexController) login(c *gin.Context) {
|
|||
pureJsonMsg(c, http.StatusOK, false, I18nWeb(c, "pages.login.toasts.wrongUsernameOrPassword"))
|
||||
return
|
||||
} else {
|
||||
logger.Infof("%s Successful Login, Ip Address: %s\n", form.Username, getRemoteIp(c))
|
||||
logger.Infof("%s logged in successfully, Ip Address: %s\n", form.Username, getRemoteIp(c))
|
||||
a.tgbot.UserLoginNotify(form.Username, ``, getRemoteIp(c), timeStr, 1)
|
||||
}
|
||||
|
||||
|
@ -87,14 +87,14 @@ func (a *IndexController) login(c *gin.Context) {
|
|||
}
|
||||
|
||||
err = session.SetLoginUser(c, user)
|
||||
logger.Info("user ", user.Id, " login success")
|
||||
logger.Info(user.Username, " logged in successfully")
|
||||
jsonMsg(c, I18nWeb(c, "pages.login.toasts.successLogin"), err)
|
||||
}
|
||||
|
||||
func (a *IndexController) logout(c *gin.Context) {
|
||||
user := session.GetLoginUser(c)
|
||||
if user != nil {
|
||||
logger.Info("user ", user.Id, " logout")
|
||||
logger.Info(user.Username, "logged out successfully")
|
||||
}
|
||||
session.ClearSession(c)
|
||||
c.Redirect(http.StatusTemporaryRedirect, c.GetString("base_path"))
|
||||
|
|
Loading…
Reference in a new issue