fosuserbundle access user object from controller symfony2 -


am new on symfony2 , using fosuserbundle manage users

how access user object controller. need user_id build directory : uploads/{user_id}/...

you can access user object in controller way:

$this->getuser(); 

so if need user id, can use getter method:

$this->getuser()->getid(); 

Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -