Closed crabnky closed 6 years ago
If you modify the table directly, then no. In that case you can run bin/console user:synchronize:usernames
.
Otherwise, when using the ORM itself, it's synced by default using the entity listener: https://github.com/msgphp/msgphp/blob/master/src/User/Infra/Doctrine/Event/UsernameListener.php
I see. And when I remove the username_lookup
from config the username table won't be used at all, right? Can I use the username table, but get rid of UsernameListener? I would take care about the username table myself - just want application only to READ from username table, not to write anything.
@crabnky yes, that's what https://github.com/msgphp/msgphp/pull/197 is about :) it allows to enable/define the Username
entity in your app, without configuring username_lookup
(for Doctrine).
Uh, the last item in https://github.com/msgphp/msgphp/issues/196 solves my problem I think. I overlooked this, sorry. :( When do you expect this to be released?
aiming for it this Wednesday :)
Currently username_lookup
is only handled by doctrine, so configuring e.g.
msgphp_user.doctrine.sync_usernames: false
would be the same as not configuring the username_lookup
.
But for future purposes it should be possible to enable the username lookup and disable doctrine handling.
see 0.7@dev
Hi, Regarding the multiple email login - what if we have another application using the same database, which can modify user emails table? In such case the changes won't be reflected in the username table, right?