You are here

function smart_ip_session_get in Smart IP 7

Same name and namespace in other branches
  1. 6.2 smart_ip.module \smart_ip_session_get()
  2. 6 smart_ip.module \smart_ip_session_get()
  3. 7.2 smart_ip.module \smart_ip_session_get()

Read session variable.

11 calls to smart_ip_session_get()
device_geolocation_check_geolocation_attempt in modules/device_geolocation/device_geolocation.module
Check Geolocation attempt.
device_geolocation_contents in modules/device_geolocation/device_geolocation.module
Device geolocation block content function.
device_geolocation_detector_ajax in modules/device_geolocation/device_geolocation.module
Google Geocoding ajax callback function data recipient.
device_geolocation_get_coordinates in modules/device_geolocation/device_geolocation.module
Get Visitor's coordinates.
device_geolocation_init in modules/device_geolocation/device_geolocation.module
Implements hook_init().

... See full list

File

./smart_ip.module, line 647
Determines country, geo location (longitude/latitude), region, city and postal code of the user, based on IP address

Code

function smart_ip_session_get($key) {
  if (module_exists('session_cache')) {
    return session_cache_get($key);
  }
  else {
    return isset($_SESSION) && isset($_SESSION[$key]) ? $_SESSION[$key] : NULL;
  }
}