userpage: make pwr accept username too

This commit is contained in:
Harvey Tindall
2023-06-22 12:33:40 +01:00
parent 3ec3e9672e
commit 22c91be127
5 changed files with 13 additions and 7 deletions

View File

@@ -478,7 +478,7 @@ func (app *appContext) UnlinkMyMatrix(gc *gin.Context) {
respondBool(200, true, gc)
}
// @Summary Generate & send a password reset link if the given email/contact method exists. Doesn't give you any info about it's success.
// @Summary Generate & send a password reset link if the given username/email/contact method exists. Doesn't give you any info about it's success.
// @Produce json
// @Param address path string true "address/contact method associated w/ your account."
// @Success 204 {object} boolResponse
@@ -502,7 +502,7 @@ func (app *appContext) ResetMyPassword(gc *gin.Context) {
var pwr InternalPWR
var err error
jfID := app.reverseUserSearch(address)
jfID := app.ReverseUserSearch(address)
if jfID == "" {
app.debug.Printf("Ignoring PWR request: User not found")