how should I require login (with rsauth) on a view? |
[eluser]Dave Rau[/eluser]
Quick question; what’s the easiest way to require login with rsauth on an entire group of views, or per view, or even to include as a header. What options do I have? Right now I’m doing this for each controller: Code: function home() {
[eluser]Dave Rau[/eluser]
I've solved my own problem, but I'm curious: is there a way to do this without a new controller? I ended up creating a new controller called logincheck.php and here's what that file looked like: Code: class Logincheck extends Controller { Then in my main controller (called manage_photos) I set this up: Code: class Manage_photos extends Controller { I post this for others in my situation; I'm a designer first, programmer second or third, so OOP concepts are still a little over my head. I found this comment on the PHP.net site very useful for describing what a PHP class is and how it's used. |
Welcome Guest, Not a member yet? Register Sign In |