[Radiant] Extending SiteController -- how to get current_user

Georges No. georges.gabereau at gmail.com
Fri Apr 18 14:12:47 CDT 2008


Hey guys,


I'm putting together a rudimentary extension to create member system
that will allow me to restrict certain front-end pages to certain logged
in users.

However, as this is my first real Rails attempt, I'm hitting some walls.
I have extended the Page model and the User model to work the way I
require, but I can't get the current_user in the SiteController.

What is the proper way to access the current logged in user in a
controller? I see that LoginSystem is setting it, but I don't really
understand where it then goes.


Sorry if this hits on some basic knowledge questions, but I'm starting
out here :)

Thanks,

georges
-- 
Posted via http://www.ruby-forum.com/.


More information about the Radiant mailing list