Example #1
0
        $_REQUEST['lookfor'] = '';
        $_GET['lookfor'] = '';
    }
}
if (!$analytics->isTrackingDisabled()) {
    $analytics->setModule($module);
    $analytics->setAction($action);
    $analytics->setObjectId(isset($_REQUEST['id']) ? $_REQUEST['id'] : null);
    $analytics->setMethod(isset($_REQUEST['method']) ? $_REQUEST['method'] : null);
    $analytics->setLanguage($interface->getLanguage());
    $analytics->setTheme($interface->getPrimaryTheme());
    $analytics->setMobile($interface->isMobile() ? 1 : 0);
    $analytics->setDevice(get_device_name());
    $analytics->setPhysicalLocation($physicalLocation);
    if ($user) {
        $analytics->setPatronType($user->patronType);
        $analytics->setHomeLocationId($user->homeLocationId);
    } else {
        $analytics->setPatronType('logged out');
        $analytics->setHomeLocationId(-1);
    }
}
// Process Authentication, must be done here so we can redirect based on user information
// immediately after logging in.
$interface->assign('loggedIn', $user == false ? 'false' : 'true');
if ($user) {
    $interface->assign('user', $user);
    //Create a cookie for the user's home branch so we can sort holdings even if they logout.
    //Cookie expires in 1 week.
    setcookie('home_location', $user->homeLocationId, time() + 60 * 60 * 24 * 7, '/');
} else {