1
irmtfan
auto login hack and xoops.2.0.7.1
  • 2004/8/22 6:21

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


is someone made the change for compatible autologin hack with xoops.2.0.7.1?
regards

2
Chado
Re: auto login hack and xoops.2.0.7.1
  • 2004/8/22 6:36

  • Chado

  • Not too shy to talk

  • Posts: 113

  • Since: 2003/6/6 7


irmtfan,
Check out download section of GIJoe's site. He has an updated auto login hack already prepared!

3
Ritchie
Re: auto login hack and xoops.2.0.7.1
  • 2004/8/22 11:39

  • Ritchie

  • Not too shy to talk

  • Posts: 162

  • Since: 2002/1/27


Hi

Just open the file include/common.php and comment out this autologin part around line 181 t/m 204:

Quote:
//autologin
if(empty($HTTP_SESSION_VARS['xoopsUserId']) && isset($HTTP_COOKIE_VARS['autologin_uname']) && isset($HTTP_COOKIE_VARS['autologin_pass'])) {
$myts =& MyTextSanitizer::getInstance();
$uname = $myts->stripSlashesGPC($HTTP_COOKIE_VARS['autologin_uname']);
$pass = $myts->stripSlashesGPC($HTTP_COOKIE_VARS['autologin_pass']);
$myts =& MyTextsanitizer::getInstance();
$user =& $member_handler->loginUserMd5(addslashes($uname), addslashes($pass));
if (false != $user && $user->getVar('level') > 0) {
// update time of last login
$user->setVar('last_login', time());
if (!$member_handler->insertUser($user, true)) {
}
$HTTP_SESSION_VARS = array();
$HTTP_SESSION_VARS['xoopsUserId'] = $user->getVar('uid');
$HTTP_SESSION_VARS['xoopsUserGroups'] = $user->getGroups();
// update autologin cookies
$expire = time() + $xoopsConfig['session_expire'] * 60 ;
setcookie('autologin_uname', $uname, $expire, '/', '', 0);
setcookie('autologin_pass', $pass, $expire, '/', '', 0);
} else {
setcookie('autologin_uname', '', time() - 3600, '/', '', 0);
setcookie('autologin_pass', '', time() - 3600, '/', '', 0);
}
}

4
irmtfan
Re: auto login hack and xoops.2.0.7.1
  • 2004/8/24 5:41

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


thank u both
chado i appreciated for the link
login with email is really usefull for non-english sites or multi-language sites.

5
otello
Re: auto login hack and xoops.2.0.7.1
  • 2004/8/24 6:39

  • otello

  • Friend of XOOPS

  • Posts: 24

  • Since: 2004/6/18


I've found these lines also in my include/common.php WHITOUT having installed the autologin hack.

What these lines are for ? If I comment out these lines without installing the autologin hack, do I have a "similar" autologin function ?

I'm curious to know what these lines are for ...

otello.

Login

Who's Online

180 user(s) are online (130 user(s) are browsing Support Forums)


Members: 0


Guests: 180


more...

Donat-O-Meter

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

Latest GitHub Commits