You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 184 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - Nuke cookie session never timesout! ??? Is this a bug ? [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
chicheongweng
Nuke Soldier
Nuke Soldier


Joined: Nov 30, 2004
Posts: 12


PostPosted: Wed Dec 15, 2004 5:27 am Reply with quoteBack to top

Hello, This is a generic nuke question. I could not seem to be able to get the answer.
If any of you know, please help me out.

After I login to a nuke portal, if I close the browser and open it again, the nuke still thinks I am logged on. How do I change this behaviour ? (ie If I log out, the session should timeout!)
Find all posts by chicheongwengView user's profileSend private message
Evaders99
Site Admin
Site Admin


Joined: Aug 17, 2003
Posts: 12482


PostPosted: Wed Dec 15, 2004 8:32 pm Reply with quoteBack to top

phpNuke uses cookies - they are designed to be stored this way. In order to use sessions, phpNuke will have to be rewritten. Sorry, those are just the facts.

_________________
Helping those that help themselves
Read FIRST or DIE!

"Fighting is terrible, but not as terrible as losing the will to fight."
Star Wars Rebellion Network - Need Help? Evaders Squadron Coding
Find all posts by Evaders99View user's profileSend private messageVisit poster's websiteAIM Address
madman
Support Mod
Support Mod


Joined: Feb 15, 2004
Posts: 806


PostPosted: Thu Dec 16, 2004 11:26 am Reply with quoteBack to top

Warning: This tweak affects to all registered users!
  1. Open/edit modules/Your_account/index.php file.
  2. Find this line:
    Code:
    setcookie("user","$info",time()+2592000);

    Replace with:
    Code:
    // backup: setcookie("user","$info",time()+2592000);
    setcookie("user","$info");

  3. Open/edit mainfile.php file.
  4. Find this line:
    Code:
    foreach ($_GET as $secvalue) {

    Before, add:
    Code:
    if (isset($_COOKIE['user']) && preg_match('/^[a-z0-9\+\/\=]+$/i', $_COOKIE['user']))
    {
      @setcookie("user","$_COOKIE[user]");
    }


In order this codehack to work, user that already logged in must be logout first then relogin. I never test it, but give it a try. Let me know if something not work as expected.

Note: User may automatically logged out if accessing PHP that not calling to mainfile.php, such as few chat modules.

_________________
I'm Image
Find all posts by madmanView user's profileSend private messageVisit poster's websiteYahoo MessengerMSN Messenger
Fl0yd
Nuke Cadet
Nuke Cadet


Joined: Mar 13, 2006
Posts: 1


PostPosted: Mon Mar 13, 2006 4:26 am Reply with quoteBack to top

hello, i know this post is an older one but it's exactly what i need. maybe someone can help me out.
im using nuke 6.0 (with some fixes, addons and a customized db).
i changed the login so there will be no more cookie with timer like described above:
Quote:
Code:
// backup: setcookie("user","$info",time()+2592000);
setcookie("user","$info");

this works perfect for me, BUT:
in every browser i start i need to login again.
i tried to find the lines in mainfile.php:
Quote:
Code:
foreach ($_GET as $secvalue) {

but there is non. i only found:
Code:
foreach ($HTTP_GET_VARS as $secvalue) {

but it takes no effect if i insert this lines before
Quote:
Code:
if (isset($_COOKIE['user']) && preg_match('/^[a-z0-9\+\/\=]+$/i', $_COOKIE['user']))
{
  @setcookie("user","$_COOKIE[user]");
}

i want the user to login once, and stay logged in when he opens a second browser. but if all browseres are closed he shoutl be logged out.
does anyone know how to fix this?
thx
greetz Fl0yd
Find all posts by Fl0ydView user's profileSend private message
Beta3
Private
Private


Joined: Jul 30, 2005
Posts: 35


PostPosted: Thu Mar 23, 2006 2:45 pm Reply with quoteBack to top

i donīt try the madman tweak . . .

the way i solver the problem is making a start page before to reach the Nuke Site, an in this page put a link to de site , but the real link is pointing to the logout ( theSite.com/modules.php?name=Your_Account&op=logout ) , then the users start Logged out every time they enter to the site. .
but itīs no funny or nice to start and read the "Logingout Message"

My idea is to put a flash intro to delay the users while the site is logged out. . And my question is :
is there any way to make the logout while the user load my intro page, without view the logout proces ??? : "now you are Logged outo" (or something like this, i donīt use english version Rolling Eyes )


Thanx

_________________
Note: iīm not a Natural English Reader/Writer, so, sorry for any gramatical error...Wink
Image
I'm the Rainbow Brite you hated . . .
Find all posts by Beta3View user's profileSend private message
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by TOGETHER TEAM srl ITALY http://www.togetherteam.it - DONDELEO E-COMMERCE http://www.DonDeLeo.com - TUTTISU E-COMMERCE http://www.tuttisu.it
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.074 Seconds - 214 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::