Symfony get connected user id from entity

后端 未结 3 1389
无人共我
无人共我 2021-01-25 12:53

In a Symfony2.8/Doctrine2 application, I need to store in each row of my SQL tables the id of the user who created or updated the row (users can connect with Ldap).

So al

3条回答
  •  猫巷女王i
    2021-01-25 13:25

    You can look at BlameableListener from gedmo/doctrine-extensions package, that work almost the way you want but with the username instead of the user id.

提交回复
热议问题