Part of the EllisLab Network
   
 
Clever login structure
Posted: 17 January 2008 02:41 AM   [ Ignore ]  
Grad Student
Avatar
Rank
Total Posts:  54
Joined  08-25-2007

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!

Profile
 
 
Posted: 17 January 2008 07:16 AM   [ Ignore ]   [ # 1 ]  
Summer Student
Total Posts:  25
Joined  05-09-2007

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.

Profile
 
 
Posted: 18 January 2008 08:59 AM   [ Ignore ]   [ # 2 ]  
Lab Assistant
RankRank
Total Posts:  226
Joined  03-12-2007

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

 Signature 

There are 10 kind of people in this world, those who understand binary and those who don’t

Profile
 
 
Posted: 18 January 2008 09:32 AM   [ Ignore ]   [ # 3 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  382
Joined  09-11-2006

I’ve had a lot of success with Erkanaauth; I like that I can use whatever fields I want as a login key.

 Signature 

flickr | twitter | rockets

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 819, on March 11, 2010 11:15 AM
Total Registered Members: 120527 Total Logged-in Users: 35
Total Topics: 126592 Total Anonymous Users: 5
Total Replies: 665524 Total Guests: 387
Total Posts: 792116    
Members ( View Memberlist )
Newest Members:  andrewknightKittx77AmityBetbulJahhnvicrussell@gmail.comdefrtymusclesseownikaiyu