Dominique De Cooman
Published on Dominique De Cooman (https://dominiquedecooman.com)

Home > How to use drupal in scripts. Bootstrap and login programaticly.

Dominique De Cooman
Tuesday, April 29, 2008 - 23:02

Create a file in the root of your drupal folder and put on top :

  require_once 'includes/bootstrap.inc';
  drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
  global $user;
  $user->uid = 1;

You can now use every drupal function within your drupal installation.


Source URL: https://dominiquedecooman.com/blog/how-use-drupal-scripts-bootstrap-and-login-programaticly