bugfix: allow spaces after user names on login from old registrations

This commit is contained in:
Jottyfan 2023-08-27 21:58:40 +02:00
parent 7732d6da25
commit f31c433c80
2 changed files with 3 additions and 2 deletions

View File

@ -8,7 +8,7 @@ plugins {
} }
group = 'de.jottyfan.camporganizer' group = 'de.jottyfan.camporganizer'
version = '0.5.4' version = '0.5.5'
description = """CampOrganizer2""" description = """CampOrganizer2"""

View File

@ -26,6 +26,7 @@ import org.jooq.Record2;
import org.jooq.SelectOrderByStep; import org.jooq.SelectOrderByStep;
import org.jooq.SelectSeekStep1; import org.jooq.SelectSeekStep1;
import org.jooq.SelectSeekStep2; import org.jooq.SelectSeekStep2;
import org.jooq.impl.DSL;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@ -93,7 +94,7 @@ public class CamplistGateway {
.leftJoin(T_PERSON).on(T_PERSON.FK_PROFILE.eq(T_PROFILE.PK)) .leftJoin(T_PERSON).on(T_PERSON.FK_PROFILE.eq(T_PROFILE.PK))
.leftJoin(REGISTRATOR).on(REGISTRATOR.PK.eq(T_PERSON.FK_REGISTRATOR)) .leftJoin(REGISTRATOR).on(REGISTRATOR.PK.eq(T_PERSON.FK_REGISTRATOR))
.leftJoin(V_CAMP).on(V_CAMP.PK.eq(T_PERSON.FK_CAMP)) .leftJoin(V_CAMP).on(V_CAMP.PK.eq(T_PERSON.FK_CAMP))
.where(T_PROFILE.USERNAME.eq(username)) .where(DSL.trim(T_PROFILE.USERNAME).eq(username == null ? null : username.trim()))
.and(T_PERSON.PK.isNotNull()) .and(T_PERSON.PK.isNotNull())
.orderBy(V_CAMP.ARRIVE.desc(), T_PERSON.CREATED); .orderBy(V_CAMP.ARRIVE.desc(), T_PERSON.CREATED);
// @formatter:on // @formatter:on