Ejemplo n.º 1
0
 public function auth()
 {
     // TODO Auto-generated method stub
     $ip = Util::getIP();
     $config = Config::getInstance();
     $ips = $config->get('interior.ip');
     foreach ($ips as $ip_range) {
         if (strpos($ip_range, ',')) {
             list($start_ip, $end_ip) = explode(',', $ip_range);
             if (Util::inValidIPRange($ip, $start_ip, $end_ip)) {
                 return true;
             }
         } else {
             if ($ip == $ip_range) {
                 return true;
             }
         }
     }
     return $this->sendAccessDined();
 }