Hi there, I hope someone has some time to help a newbie extension programmer out here...
I'm wanting to change the groups a user belongs to from inside the checkCredentials hook, while the user is logging in. I've tried updating the database directly using something like...
Code:
$this->Database->prepare("UPDATE tl_member SET groups = ? WHERE username = ?")...
but the changes always get overwritten again immediately after with the original values. I think further down the line in the login process the original record must be being written out again from the values in memory.
My question is simply, how can you change a user's groups (or for that matter any field) from inside an extension and have those changes reflected both internally in the User object in memory and on the database?
I realise this is probably painfully basic, but I've just spent two days trying everything out I could think of, and my knowledge just isn't up to the task :-(
Massive thanks in advance!!
Dubs
Bookmarks