functions controlling login

I am trying to follow the code when someone logs in with cookies enabled.

I want to fire a login alert if they haven't been online for 12 hours but do not go thru the login process.

I can follow the login process, I get lost when they have a cookie enabled and it just loads the site tho.

Thanks for your help.

http://www.mytikibar.com
Quote · 21 Nov 2012

Nevermind, I found it!

in index.php around line 63

AFTER THIS

check_logged();

PUT THIS
###
#SteveSoft
#11-21-2012
#       
        $aRes = $GLOBALS['MySQL']->getRow("SELECT `DateLastNav` FROM `Profiles` WHERE `ID`='" . $_COOKIE['memberID'] . "'");       
        $sDifference =  time() - strtotime($aRes['DateLastNav']);
       
            if ($sDifference >= (3600*8)){           
                require_once(BX_DIRECTORY_PATH_CLASSES . 'BxDolAlerts.php');
                $oZ = new BxDolAlerts('profile', 'login',  $_COOKIE['memberID']);
                $oZ->alert();
            }
           

This will trigger a login alert if they have "Remember Me"  checked and haven't been on the site in 3600*8  (8 hours).

This is if you have a credits or points mod installed, they can still get those even if they don't use the login form.  Or you want to pop up an alert, etc...



http://www.mytikibar.com
Quote · 21 Nov 2012

A quick update...

This now seems to work perfectly edit index.php

around line 61 find


check_logged();

ADD THIS

###
#SteveSoft
#11-21-2012
#       

    if ($_COOKIE['memberID'] > 0 ){
        $aRes = $GLOBALS['MySQL']->getRow("SELECT `DateLastNav` FROM `Profiles` WHERE `ID`='" . $_COOKIE['memberID'] . "'");       
        $sDifference =  time() - strtotime($aRes['DateLastNav']);
       
            if ($sDifference >= (3600*4)){
                update_date_lastnav($_COOKIE['memberID']);           
                require_once(BX_DIRECTORY_PATH_CLASSES . 'BxDolAlerts.php');
                $oZ = new BxDolAlerts('profile', 'login',  $_COOKIE['memberID']);
                $oZ->alert();
            }
    }
 

http://www.mytikibar.com
Quote · 22 Nov 2012
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.