This content has been marked as final.
Show 3 replies
-
1. Re: DatabaseLoginServerModule - query with id possible?
ragavgomatam May 10, 2009 10:22 PM (in response to nschweig)Or do I have to write a custom login module?
Yes. -
2. Re: DatabaseLoginServerModule - query with id possible?
wolfgangknauf May 11, 2009 7:07 AM (in response to nschweig)Hi Nicole,
I think that this should work:select userroles, 'Roles' from userroles where roles_id in (select roles_id from cmtuser_role where cmtuser_id in (select user_id from users where username = ?))
The innermost subselect queries the user ids for a username (can be only one or zero), the outer subselect queries the role ids for this user id, and for those role ids the role names are queried.
Hope that the statement reflects your table structure ;-).
Wolfgang -
3. Re: DatabaseLoginServerModule - query with id possible?
nschweig Jul 6, 2009 11:40 AM (in response to nschweig)Hi,
sorry, I forgot to write.
It was:select title, 'Roles' from role where id in (select roles_id from cmtuser_role where cmtuser_id in (select id from cmtuser where username = ?))
for my db-structure. Thank you very very much for your hint; it was very important for me to find the solution. :-)
Thanks.
NSchweig