Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: Good way to redirect to a "members only" section of website

by Shuraski (Scribe)
on Feb 02, 2013 at 17:02 UTC ( [id://1016723]=note: print w/replies, xml ) Need Help??


in reply to Re: Good way to redirect to a "members only" section of website
in thread Good way to redirect to a "members only" section of website

Yagna, my best advice is to use Catalyst to get this functionality nicely.

You include Catalyst::Plugin::Authentication just like it says in the Catalyst Tutorial.

You basically end up leading off each templated page that you want restricted to logged-in users with this:

[% IF c.user_exists %] ...the rest of your content here... [% END %]
Your home page or whatever you want to call it won't include this code at the head, so users who haven't logged in yet can see the content that you've not restricted. It works nicely without a lot of fuss. Have fun!

Replies are listed 'Best First'.
Re^3: Good way to redirect to a "members only" section of website
by yagna (Novice) on Feb 02, 2013 at 17:18 UTC
    Hi Shuraski, Since my application is simple I wanted to stay away from frameworks. I will test it out just get a feel for using catalyst. Thanks, Yagna

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1016723]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2024-04-25 13:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found