masteryoda
masteryoda

Reputation: 282

kohana - organization of profile controller

I want to build a website with some simple social fetures. I wonder how to organize user profiles. My doubts are:

When example.com/user/someuser is executed

I plan to make it like this: profile controller class - check if user is logged

But what if someone put something in url like: edit or something? Please give some advice how t organize something like this, or maybe someone could give some links with tutorials or something?

Upvotes: 0

Views: 82

Answers (1)

Dickie
Dickie

Reputation: 597

The basic idea is to check for authentication in the controller's before() method, which gets executed prior to the controllers action methods. Here are links to a couple of examples:

Official Kohana Documentation - Controller: Before and after

Unofficial Kohana 3 Wiki - Using Auth with template extended controllers

Upvotes: 1

Related Questions