diff --git a/app/features/tournament/actions/to.$id.register.server.ts b/app/features/tournament/actions/to.$id.register.server.ts index fcccbc98e..eb8e45a1b 100644 --- a/app/features/tournament/actions/to.$id.register.server.ts +++ b/app/features/tournament/actions/to.$id.register.server.ts @@ -261,8 +261,8 @@ export const action: ActionFunction = async ({ request, params }) => { "No trust given from this user", ); errorToastIfFalsy( - (await UserRepository.findLeanById(user.id))?.friendCode, - "No friend code", + (await UserRepository.findLeanById(data.userId))?.friendCode, + "User you are trying to add has no friend code set", ); errorToastIfFalsy(tournament.registrationOpen, "Registration is closed");