/users/whatid using querystring param name

This commit is contained in:
Howl
2016-05-14 18:52:55 +02:00
parent 3a199b8c41
commit 8114329d38
2 changed files with 2 additions and 2 deletions

View File

@@ -125,7 +125,7 @@ func UserWhatsTheIDGET(md common.MethodData) common.CodeMessager {
r whatIDResponse
allowed int
)
err := md.DB.QueryRow("SELECT id, allowed FROM users WHERE username = ? LIMIT 1", md.C.Param("username")).Scan(&r.ID, &allowed)
err := md.DB.QueryRow("SELECT id, allowed FROM users WHERE username = ? LIMIT 1", md.C.Query("name")).Scan(&r.ID, &allowed)
if err != nil || (allowed != 1 && !md.User.Privileges.HasPrivilegeViewUserAdvanced()) {
return common.SimpleResponse(404, "That user could not be found!")
}