Forums | Mahara Community

Developers /
"Remember Me" option at login


anonymous profile picture
Account deleted
Posts: 34

26 August 2009, 9:43

I was wondering if anybody could point me in the right direction as to how I could implement a "Remember Me" option at the login.  Sort of what Gmail / iGoogle has.  I know that I'll probably have to mess with the cookies / session part of Mahara but I have no idea where I should begin.  If anybody has implemented a similar type of functionality please let me know!  Thank you.
anonymous profile picture
Account deleted
Posts: 117

26 August 2009, 15:42

Do you want it to remember just the username and fill it in the form field or do you want to have it log them in automatically if they had previously selected the "remember me" checkbox?
anonymous profile picture
Account deleted
Posts: 34

26 August 2009, 17:26

I was wanting it to log them in automatically if they had previously selected the "remember me" checkbox.
anonymous profile picture
Account deleted
Posts: 1643

26 August 2009, 18:27

Mahara sets a session cookie that lasts quite a lot longer than the average user session, so you can use that to detect users returning. You'll probably need to set another cookie to say they checked the 'remember me' box - you can do that in login_submit() in auth/lib.php.

Not sure exactly where I'd put the code to detect a returning user who isn't logged in and log them in. 

4 results