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
Post a Comment