Fixed a bug where a user's tag can get desynced with their group.
This commit is contained in:
parent
34b8d8dc3c
commit
c15f02396a
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user