31
patagon
Re: remembering logins?
  • 2003/4/10 21:07

  • patagon

  • Quite a regular

  • Posts: 235

  • Since: 2002/1/8 0


If you do I hope you consider sharing it here..I would also like that. I undesrtand there may be security concerns and all that, but if amazon remembers my login name (among others) my hobby site can also...

Thanks

32
patagon
Re: remembering logins?
  • 2003/4/10 21:10

  • patagon

  • Quite a regular

  • Posts: 235

  • Since: 2002/1/8 0


Didnt know about that..seems like a nice solution for sites where security isnt a major concern. THANKS

33
supernix
Re: remembering logins?
  • 2003/4/12 17:33

  • supernix

  • Not too shy to talk

  • Posts: 151

  • Since: 2003/3/13


Like one member pointed out if they were that scared about security they would get a SSL cert.

And not allow any anonymous access.

And like he pointed out if other popular sites remember your login info then so could Xoops.

And like many of the security people say.
" If your really concerned about security that bad unplug it from the wall "

http://www.dnspad.com/xoops/

34
Diva
Re: remembering logins?
  • 2003/4/21 17:47

  • Diva

  • Just popping in

  • Posts: 10

  • Since: 2002/12/28


I just wanted to weigh in, I've set a long time out in the main menu, plus chose the option to store my cookie for a year on my personal profile, and it logs me out if I close the browser, and sometimes even whilst I'm reading the forums.

We've lost a LOT of users in the past two weeks, because people complain that it's losing their login too often.

I like Xoops, and I want to use it, but this is a really important thing. We have a lot of regular users, and it's too much work to relogin in EVERY time you want to post.

35
Diva
Re: remembering logins?
  • 2003/4/21 17:59

  • Diva

  • Just popping in

  • Posts: 10

  • Since: 2002/12/28


Hey - I can't find that hack that someone listed earlier...the link is invalid. Any idea where it is or what I should search for on the site to find it?

Thanks!

36
sylvainb
Re: remembering logins?
  • 2003/4/22 20:51

  • sylvainb

  • Not too shy to talk

  • Posts: 168

  • Since: 2003/2/11


And voila!
Quote:
File: user.php
==============
After:
------
setcookie($xoopsConfig['session_name'], '', time()- 3600, '/', '', 0); (line +/- 74)
Add:
----
//autologin code//
setcookie ("uid", "", time() - 3600);
setcookie ("pass", "", time() - 3600);
//end autologin code//




File: common.php
================
After:
------
$sess_handler =& xoops_gethandler('session'); (line +/- 127)
Add:
----
//autologin code//
if(empty($HTTP_SESSION_VARS['xoopsUserId']) && !empty($HTTP_COOKIE_VARS['uid']))
{
$passSQL = "select uid from ".$xoopsDB->prefix("users")." where pass = '".$HTTP_COOKIE_VARS['pass']."' and uid = ".$HTTP_COOKIE_VARS['uid'];
@$passQry = $xoopsDB->query($passSQL);
$passRst = $xoopsDB->fetchArray($passQry);
if ($passRst['uid'] == $HTTP_COOKIE_VARS['uid'])
{
$HTTP_SESSION_VARS['xoopsUserId'] = $HTTP_COOKIE_VARS['uid'];
$xoopsUser =& $member_handler->getUser($HTTP_SESSION_VARS['xoopsUserId']);
$HTTP_SESSION_VARS['xoopsUserGroups'] = $xoopsUser->getGroups();
}
else
{
setcookie ("session_name", "", time() - 3600);
setcookie ("uid", "", time() - 3600);
setcookie ("pass", "", time() - 3600);
}
}
//end autologin code//
After:
------
setcookie($xoopsConfig['session_name'], session_id(), time()+(60*$xoopsConfig['session_expire']), '/', '', 0); (line +/- 172)
Add:
----
if(!empty($HTTP_COOKIE_VARS['pass']) && !empty($HTTP_COOKIE_VARS['uid'])) // check or cookies already exist
{
// Cookie Set Code for autologon //
$passSQL = "select pass from ".$xoopsDB->prefix("users")." where uid = ".$HTTP_SESSION_VARS['xoopsUserId'];
@$passQry = $xoopsDB->query($passSQL);
$passRst = $xoopsDB->fetchArray($passQry);
setcookie('uid',$HTTP_SESSION_VARS['xoopsUserId'],time()+(60*60*24*365), '/', '', 0);
setcookie('pass',$passRst['pass'],time()+(60*60*24*365), '/', '', 0);
// Cookie Set Code for autologon //
}





Template: system_block_login.html
=================================
Add:
----
Remember me?





File: include/checklogin.php
============================
After:
------
setcookie($xoopsConfig['session_name'], session_id(), time()+$xoopsConfig['session_expire'], '/', '', 0);
Add:
----
if($rememberme == "On") // check or user has checked the checkbox, if not do nothing
{
// == Cookie Set Code for AutoLogon == //
$passSQL = "select pass from ".$xoopsDB->prefix("users")." where uid = ".$HTTP_SESSION_VARS['xoopsUserId'];
@$passQry = $xoopsDB->query($passSQL);
$passRst = $xoopsDB->fetchArray($passQry);
setcookie('uid',$HTTP_SESSION_VARS['xoopsUserId'],time()+(60*60*24*365), '/', '', 0);
setcookie('pass',$passRst['pass'],time()+(60*60*24*365), '/', '', 0);
// == Cookie Set Code for AutoLogon == //
}

But it's still on koudanshi's site THERE

37
Boobtoob
Re: remembering logins?
  • 2003/4/23 1:33

  • Boobtoob

  • Friend of XOOPS

  • Posts: 202

  • Since: 2001/12/22


just as an fyi, this is a nice hack that works but remember that when you update your XOOPS installation from CVS or fix packs that these files will probably get over written. Keep that in mind and remember to patch any files or you will be pulling your hiar out next time.

38
sylvainb
Re: remembering logins?
  • 2003/4/23 4:59

  • sylvainb

  • Not too shy to talk

  • Posts: 168

  • Since: 2003/2/11


Yes, i know!
I've just experienced it with a patch to include a gallery!

39
mike-h
Re: remembering logins?
  • 2003/4/23 11:22

  • mike-h

  • Just popping in

  • Posts: 5

  • Since: 2002/8/7 6


what are the chances of this autologin being added to the offical core
Understand concerns, but if offered as a option can only be a good addition ..........maybe?

mike


40
Hapko3
Re: remembering logins?
  • 2003/4/28 22:44

  • Hapko3

  • Just popping in

  • Posts: 2

  • Since: 2003/4/1 1


ttt

Login

Who's Online

237 user(s) are online (187 user(s) are browsing Support Forums)


Members: 0


Guests: 237


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Dec 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits