Closed richardhj closed 6 years ago
Wow, this looks great! I'll add some comments to minor things to change.
Thanks for the feedback.
Do you want to keep up the support of auto_activate_where
.
I added the trigger of the InteractiveLoginEvent
as seen in https://ourcodeworld.com/articles/read/459/how-to-authenticate-login-manually-an-user-in-a-controller-with-or-without-fosuserbundle-on-symfony-3
Is this really necessary? A token should automatically be stored by the symfony listener.
I'll check that.
I've implemented the feedback and am awaiting feedback on two of my comments above 😇
Should be fine now. Thanks for all the feedback.
Thanks a lot! I have merged this and added some fixes, can you please test the latest master branch before I tag the new version?
The package is now available on packagist as well. Be aware that it won't show up in Contao Manager atm, you need to install it manually through composer.
OK, one more thing:
submitOnChange
to the dca of auto_activate_registration
.onCreateNewUser
needs a fix (see below).The query looks like this atm: An exception occurred while executing 'UPDATE tl_member SET disable = WHERE id=?'
if ($pageModel->auto_activate_registration) {
$match = $this->connection->createQueryBuilder()
->update('tl_member')
- ->set('disable', '')
+ ->set('disable', ':disable')
->where('id=:id')
+ ->setParameter(':disable', '')
->setParameter('id', $userId)
->execute()
;
But after all, I verified that both modes are working.
Sorry for the delay. I have fixed all issues, can you please check again?
Installed 14bc609 and verified that both auto login and auto activation are working as expected. 👍 👍
Thanks! Finally released 😎 https://packagist.org/packages/terminal42/contao-autoregistration
Do you also want to give it some extended and translated description for the manager? https://github.com/contao/package-metadata
It may occur that autoregistration does not work for Contao >=4.5 since the auth components changed.
I did a rework for Contao 4.5. The "auto login after activation" is tested. The "auto activation, auto login" not yet though.
Opening the PR here just in case somebody needs this extension.