Fixed a bug where a user's tag can get desynced with their group.

This commit is contained in:
Azareal 2018-10-14 16:16:42 +10:00
parent 34b8d8dc3c
commit c15f02396a
2 changed files with 2 additions and 2 deletions

View File

@ -241,7 +241,7 @@ func preRoute(w http.ResponseWriter, r *http.Request) (User, bool) {
}
var usercpy *User = BlankUser()
*usercpy = *userptr
usercpy.InitPerms()
usercpy.Init() // TODO: Can we reduce the amount of work we do here?
// TODO: WIP. Refactor this to eliminate the unnecessary query
// TODO: Better take proxies into consideration

View File

@ -66,7 +66,7 @@ func ViewProfile(w http.ResponseWriter, r *http.Request, user common.User) commo
} else if err != nil {
return common.InternalError(err, w, r)
}
puser.InitPerms()
puser.Init()
}
header.Title = common.GetTitlePhrasef("profile", puser.Name)
header.Path = common.BuildProfileURL(common.NameToSlug(puser.Name), puser.ID)