How to Catch user id in session?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gundogduyakici
    Senior Member
    • Mar 2018
    • 165

    How to Catch user id in session?

    I will make a special report to the logged-in user. But I can not catch the id of the logged in user in sql.
  • tanya
    Senior Member
    • Jun 2014
    • 4308

    #2
    What about $this->getContainer()->get('user');

    Comment

    • gundogduyakici
      Senior Member
      • Mar 2018
      • 165

      #3
      How do I use it to get an id?
      Could you give me an example? like this

      $this->getContainer()->get('user')->id;

      Comment

      Working...