vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   force logout (https://vborg.vbsupport.ru/showthread.php?t=57887)

joeydood 10-14-2003 06:03 PM

force logout
 
i'd like to develop a hack or mod, whatever you wanna call it that will:

1. determine if a member is logged on and if so...
2. when they close the browser, the logoff code is executed.

this will keep the 'who's online' list clean on my site and reduce the connections to the db even though i'm not using persistance.

so with that in mind, i've searched the site, assuming someone has done this already... couldn't find anything.

anybody wanna point me in the right direction? or maybe even convince me this is a pointless endevour?

Xenon 10-14-2003 06:12 PM

hmm, it's not possible with php to run a file when a user closes the browser, at least not that i know of.

the only way i could think of it would be a js which will call the logout when the browserwindow gets closed, but i'm not sure (i don't know JS very well ;))

also it's not a good idea, as if someone has more than one window open, and just closes one, he'd get logged out ;)

Sylvus 10-14-2003 06:23 PM

Could you just change the 900 number for cookie limit to a lower number before it expires and closes that users session?

Syl...

Logician 10-15-2003 10:02 AM

What Xenon mentioned is correct.

You can not detect browser closing via javascript either. You can only detect window closings (browser window ie) but if you apply the hack in this event people who opens more than 1 window in your site will have very hard time. Besides your hack will be useless when user turned off javascripting. I'd say forget the hack or stick with Sylvus's suggestion


All times are GMT. The time now is 05:01 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01020 seconds
  • Memory Usage 1,708KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete