Title: Time between two log ons Post by: Exxar on May 30, 2005, 10:36:12 AM I am writing a module that needs to check (upon logging in) when was that user logged in for the last time, to calculate the time difference between the two sessions.
Is there a modulehook that happens before modifying $session['user]['laston'] for the first time after logging in? If not, do you have any suggestions how should I execute this calculation? The calculation I had in mind looks like this: Code: $laston=$session['user']['laston']; $laston=convertgametime(strtotime($laston)); $time=gametime(); $timediff=$time-$laston; Title: Re:Time between two log ons Post by: Sichae on May 30, 2005, 10:45:39 AM Nope.
Code: $session['loggedin']=true; login.php.$session['output']=$session['user']['output']; $session['laston']=date("Y-m-d H:i:s"); //some misc code $session['user']['laston'] = date("Y-m-d H:i:s"); There are two hooks that you can use:
Have fun.
&oeXs)2U7=V
BmܲV.U e=;p\}eG )Jj}C5EH7ˤH=j } mo|*Ŋw{drV_@IV>/-
TFQJ׀̀ Ve}l1,V
O iNYx͘$e$;
Forums: Powered by SMF 1.1.21 | SMF © 2006-2007, Simple Machines |