acquia.inc access restriction methods on Drupal 8.

acquia.inc access restriction methods on Drupal 8.

1 post / 0 new
kaneko@zerobase.jp's picture
kaneko
Points: 5
acquia.inc access restriction methods on Drupal 8.

I'm trying acquia.inc file restriction methods with Drupal 8.

https://gist.github.com/acquialibrary/9553136

This is code for Drupal 7 or before.
Dose anyone know how to fix this for Drupal 8?

ip_address() and drupal_is_cli() are removed in Drupal 8.

I add two functions for acquia.inc file. But it won't work.

function drupal_is_cli() {
  return PHP_SAPI === 'cli';
}

function ip_address() {
  return \Drupal::request()->getClientIp();
}
Status: 
Unresolved