mirror of
https://github.com/hrfee/jfa-go.git
synced 2024-12-22 09:00:10 +00:00
users: attach Jellyfin ID to contactMethodUser
This commit is contained in:
parent
54e4a51a7f
commit
280c6e4f16
@ -37,6 +37,11 @@ func (app *appContext) NewUserFromAdmin(gc *gin.Context) {
|
|||||||
gc.BindJSON(&req)
|
gc.BindJSON(&req)
|
||||||
|
|
||||||
profile := app.storage.GetDefaultProfile()
|
profile := app.storage.GetDefaultProfile()
|
||||||
|
if req.Profile != "" && req.Profile != "none" {
|
||||||
|
if p, ok := app.storage.GetProfileKey(req.Profile); ok {
|
||||||
|
profile = p
|
||||||
|
}
|
||||||
|
}
|
||||||
nu := app.NewUserPostVerification(NewUserParams{
|
nu := app.NewUserPostVerification(NewUserParams{
|
||||||
Req: req,
|
Req: req,
|
||||||
SourceType: ActivityAdmin,
|
SourceType: ActivityAdmin,
|
||||||
@ -225,6 +230,7 @@ func (app *appContext) NewUserFromInvite(gc *gin.Context) {
|
|||||||
nonEmailContactMethodEnabled = true
|
nonEmailContactMethodEnabled = true
|
||||||
}
|
}
|
||||||
app.contactMethods[i].DeleteVerifiedToken(c.PIN)
|
app.contactMethods[i].DeleteVerifiedToken(c.PIN)
|
||||||
|
c.User.SetJellyfin(nu.User.ID)
|
||||||
c.User.Store(&(app.storage))
|
c.User.Store(&(app.storage))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user