why is there no getId()
method inside the UserInterface
in Symfony 4? i tried to pass UserInterface $user
to my Controller method to actually access the current logged in user's id with $user->getId()
. but this method simply doesent exist inside this interface - talking about best practice i should not simply add these method to the interface right?
i also tried to use my entity but was not able to access the current user object to fetch the id off the object.
first time sf4, am i getting it totally wrong?