-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathauthcache.php
More file actions
33 lines (29 loc) · 1.11 KB
/
authcache.php
File metadata and controls
33 lines (29 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
/**
* @file
* Alternative front controller for user specific content fragments.
*
* In order to use this front-controller it is necessary to place it into the
* drupal root directory and then add the following line to settings.php:
*
* $conf['authcache_p13n_frontcontroller_path'] = 'authcache.php';
*
* Since the frontcontroller location is stored on routes, you might have to
* rebuild existing routes for the change to take effect.
*
* Note: when authcache is not installed into sites/all/modules, the definition
* of AUTHCACHE_P13N_ROOT below needs to be adapted also.
*/
/**
* Root directory of Drupal installation.
*/
define('DRUPAL_ROOT', getcwd());
/**
* Root directory of Authcache Personalization module.
*/
define('AUTHCACHE_P13N_ROOT', DRUPAL_ROOT . '/sites/all/modules/contrib/authcache/modules/authcache_p13n');
require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
require_once AUTHCACHE_P13N_ROOT . '/includes/frontcontroller.inc';
$req = authcache_p13n_frontcontroller_prepare_request();
drupal_bootstrap(DRUPAL_BOOTSTRAP_SESSION);
authcache_p13n_frontcontroller_handle_request($req);