referrals: show referrer username on form
This commit is contained in:
@@ -619,6 +619,14 @@ func (app *appContext) InviteProxy(gc *gin.Context) {
|
||||
}
|
||||
userPageAddress += "/my/account"
|
||||
|
||||
fromUser := ""
|
||||
if inv.ReferrerJellyfinID != "" {
|
||||
sender, status, err := app.jf.UserByID(inv.ReferrerJellyfinID, false)
|
||||
if status == 200 && err == nil {
|
||||
fromUser = sender.Name
|
||||
}
|
||||
}
|
||||
|
||||
data := gin.H{
|
||||
"urlBase": app.getURLBase(gc),
|
||||
"cssClass": app.cssClass,
|
||||
@@ -654,6 +662,7 @@ func (app *appContext) InviteProxy(gc *gin.Context) {
|
||||
"reCAPTCHASiteKey": app.config.Section("captcha").Key("recaptcha_site_key").MustString(""),
|
||||
"userPageEnabled": app.config.Section("user_page").Key("enabled").MustBool(false),
|
||||
"userPageAddress": userPageAddress,
|
||||
"fromUser": fromUser,
|
||||
}
|
||||
if telegram {
|
||||
data["telegramPIN"] = app.telegram.NewAuthToken()
|
||||
|
||||
Reference in New Issue
Block a user