Answer the question
In order to leave comments, you need to log in
Silex - getter for getting user login
Hello.
I continue to understand Silex. This time the following question arose:
Authorization is implemented on the site. And sometimes you want to write the user's login to the database.
The doc contains the code:
$token = $app['security']->getToken();
if (null !== $token) {
$user = $token->getUser();
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question