You are here

public static function SecuresiteManager::handle403 in Secure Site 8

Menu callback; handle restricted pages.

File

src/SecuresiteManager.php, line 580
Contains \Drupal\securesite\SecuresiteManager.

Class

SecuresiteManager

Namespace

Drupal\securesite

Code

public static function handle403() {
  global $user;
  if (empty($user->uid) && !isset($_SESSION['securesite_guest']) && $_GET['q'] != 'user/logout') {
    _securesite_dialog(securesite_type_get());
  }
  else {
    $path = \Drupal::service('path.alias_manager.cached')
      ->getSystemPath(\Drupal::config('securesite.settings')
      ->get('securesite_403'));
    menu_set_active_item($path);
    return menu_execute_active_handler($path);
  }
}