From: Raphaƫl Gertz Date: Thu, 31 Oct 2024 05:56:35 +0000 (+0100) Subject: Remove guestid and guestgroup in favour of more reliable defaultgroup X-Git-Tag: 0.5.1~8 X-Git-Url: https://git.rapsys.eu/userbundle/commitdiff_plain/ac82424b6b1631f6b224d171a97d48d57be842b9?hp=3469edb1180f264977e509d8ca4c4dfe15357cf8 Remove guestid and guestgroup in favour of more reliable defaultgroup Cleanup --- diff --git a/Repository/UserRepository.php b/Repository/UserRepository.php index ec5ffa3..85dad14 100644 --- a/Repository/UserRepository.php +++ b/Repository/UserRepository.php @@ -76,8 +76,8 @@ FROM ( u.mail, u.forename, u.surname, - IFNULL(g.id, :guestid) AS g_id, - IFNULL(g.title, :guesttitle) AS g_title + IFNULL(g.id, 0) AS g_id, + IFNULL(g.title, :defaultgroup) AS g_title FROM RapsysUserBundle:User AS u LEFT JOIN RapsysUserBundle:UserGroup AS gu ON (gu.user_id = u.id) LEFT JOIN RapsysUserBundle:Group AS g ON (g.id = gu.group_id) @@ -103,7 +103,6 @@ SQL; ->addScalarResult('mail', 'mail', 'string') ->addScalarResult('forename', 'forename', 'string') ->addScalarResult('surname', 'surname', 'string') - ->addScalarResult('g_id', 'g_id', 'integer') ->addScalarResult('g_title', 'g_title', 'string'); //Fetch result