Welcome Guest, Not a member yet? Register   Sign In
Clever login structure
#1

[eluser]Kurai[/eluser]
Hi there.
I'm trying to build a message system. It will be something like twitter in my mind, but without the character limitation. I'm trying to stick to a very simple build, and then expand it later.

Basically what the system should do is:

- You enter and you see the login page, where you put your username and password.
- then you're redirected to your personal page, which shows all the messages you have received.
- you can send messages to other users

Now, I'm a bit stuck with the login form. I tried simplelogin, but I really don't get how to deal with session. Basically, what I want is to bypass the login session if I'm already logged in. But since currently my main page is expecting to get the Post data from the login, it obviously throw an error.
Do you have any advice on how it's best to operate?

Should I trash Simplelogin and build up a database method instead?

Thank you!
#2

[eluser]leon_dewey[/eluser]
Check session data then check post data... if both are null then redirect to login if eather are good then show page. Check the session first.
#3

[eluser]obiron2[/eluser]
look at freakauthlight (youll fidn it in wiki)

To add it your pages you just need to add a couple of lines to each function (or to the index of the controller)

It automatically checks for login and login level and redirects to the login page if necessary then returns to the calling function. nice.

Obiron
#4

[eluser]Nick Husher[/eluser]
I've had a lot of success with Erkanaauth; I like that I can use whatever fields I want as a login key.




Theme © iAndrew 2016 - Forum software by © MyBB