-
-
Notifications
You must be signed in to change notification settings - Fork 489
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
to convert user entity to string #70
Comments
actually, i was using the in_memory provider instead of fos_userbundle for security firewall, and thats why the error appears. |
@ivan1986 the SonataUserBundle rely on a |
i try, it's final class :( |
you can create your own class then |
it's not good way, but now i don't know how use not FOS user but this fix (app.user.username) {% block user_block %}{% if app.user %}{{ app.user.username }} - <a href="{{ url('sonata_user_admin_security_logout') }}">{{ 'user_block_logout'|trans({}, 'SonataUserBundle') }}</a> {% endif %}{% endblock %} solve |
@rande This is still an issue |
yes it is. |
+1 |
i think i got me too +1 (sym2.5 + SonataAdmin + SonataUser + FOS + odm)
|
+1 ... so it's not possible to use in_memory user provider to login into the admin area? |
trying to see admin dashboard, i get the following:
An exception has been thrown during the rendering of a template ("Catchable Fatal Error: Object of class Symfony\Component\Security\Core\User\User could not be converted to string in /home/pajooh/web/app/cache/dev/twig/67/b2/dee9cd5a99bf1b282fb737c319bd.php line 24") in SonataUserBundle:Admin/Core:user_block.html.twig at line 1.
the problem is that in the user_block.html.twig, the {{ app.user}} can not be converted to string.
The text was updated successfully, but these errors were encountered: