Hi,

I'm a newbie with writing extensions. I'm trying to develop an login authorisation extension which takes member (frontend user) info from another database. I'm basing it on the existing LDAP auth extension. I'm really hoping someone can help me get to grips with some basic issues which are really frustrating me...

Firstly, how do you debug your SQL queries on a second database connection? I've tried setting the "debug" mode on in Contao settings, but this isn't working for my extension, either because my page gets redirected away the moment I login on the front end, or because my second database connection I'm using for the external authentication isn't picking up the debug setting - I'm not sure which (both?). This is frustrating me because I can't even check if the SQL queries I think I'm composing and executing are actually being executed the way I think!

Secondly, I'd like to write and update a Member's user record from the extension inside the hook checkCredentials, and I don't know how to do it. A simple SQL UPDATE isn't working. Either the command isn't getting executed, or the old user record in memory is getting written out to the database again further along the chain, overwriting my UPDATE. Likewise writing to the values in $this->User isn't doing much either. I tried calling save() on the changes too, but that isn't working for me. I must be doing this completely wrongly, but I'm clutching at straws here.

Can anyone shed any light on these issues? I appreciate they're really basic, but I'm having a really hard time here as a newbie extension programmer!

Big thanks,
dubs.