5

Now I have a project with pyrocms, I have a problem to get the current id user in module's controller, does anyone know how to get it?

Christian Giupponi
  • 7,408
  • 11
  • 68
  • 113
  • http://www.google.com/search?q=pyrocms%20user_id => http://www.pyrocms.com/forums/topics/view/629 => `$this->user->id;` – stormdrain Feb 20 '12 at 14:39

2 Answers2

11

Use:

$this->current_user->id
Christian Giupponi
  • 7,408
  • 11
  • 68
  • 113
0

This returns null for me.
I know I'm logged in as on my template I'm echoing

{{ user:display_name }}

Just fine.

Oddness

Christian Giupponi
  • 7,408
  • 11
  • 68
  • 113
Beertastic
  • 691
  • 1
  • 9
  • 27