Wednesday 24 March 2004 10:43:25 am - 13 replies
Hi ez,
After having browsed the forums I've noticed that several people have requested the "remmeber me" feature of the login (having it stored in a cookie) over the past months.
What's the status on this feature? Will it be implemented in v. 3.4? Has anyone implemented it/made an extension for it?
Thanks in advance !
Sincerely,
Eirik Johansen
Sunday 11 December 2005 3:47:46 pm
Not standard, but as contribution by Kristof:
http://ez.no/community/contribs/hacks/cookie_user
Regards
--paul
Sunday 11 December 2005 8:30:14 pm
Nice, I was just thinking about writing something very similar ![]()
This should be integrated (and used on ez.no while we're at it
Doesn't really seem to work for me: http://ez.no/community/contribs/hacks/cookie_user#msg89198
Modified on Sunday 11 December 2005 9:37:52 pm by Gabriel Ambuehl
Tuesday 13 December 2005 3:39:21 pm
I've made a mistake with the extension directory name. I've uploaded a new tarball with the fix. If I have time, I will try to test and release a new version with seperate cookies per site access (already in SVN, kernel patches not modified yet) and patches for newer eZ publish versions.
Thursday 15 December 2005 10:34:47 am
There seems to be another bug: when clicking on logout, the cookies don't seem to get deleted and one thus stays logged in!
The usually expected behavior would likely be to really get logged out, have the cookies deleted and be asked for PW next time one comes around...
Modified on Thursday 15 December 2005 10:35:37 am by Gabriel Ambuehl
Thursday 15 December 2005 2:42:22 pm
I have some days off from work so I'm not going to fix these issues immediately, but maybe you can contribute to the extension (it's in the community svn repository) by adding this functionality.
Encryption of the cookies would be safer of course.
Some hints on how to remove cookies on logout:
From kernel/user/logout.php:
include_once( "lib/ezutils/classes/ezhttptool.php" ); include_once( "kernel/classes/datatypes/ezuser/ezuser.php" ); $http =& eZHTTPTool::instance(); $user =& eZUser::instance(); $user->logoutCurrent(); $http->setSessionVariable( 'force_logout', 1 ); $ini =& eZINI::instance(); $redirectURL = $ini->variable( 'UserSettings', 'LogoutRedirect' ); return $Module->redirectTo( $redirectURL );
The session variable 'force_logout' isn't used anywehere else by the system (I've tried to find it in other files with grep). You can check on the existence of this session variable in cookieuser/login.php and if it exists, delete the login cookies and afterwards remove the session variable. I think this will work.
Good luck!
Monday 16 January 2006 11:36:39 am
Check out the new version (1.3) of Cookie User (http://ez.no/community/contribs/hacks/cookie_user), which
- encrypts the password cookie
- disables authentication cookie checking on logout
You must be logged in to post messages in this topic!