Skip to content

Instantly share code, notes, and snippets.

@eguicciardi
Created June 11, 2013 08:04
Show Gist options
  • Save eguicciardi/5755180 to your computer and use it in GitHub Desktop.
Save eguicciardi/5755180 to your computer and use it in GitHub Desktop.
Drupal 7 - New password generation
<?php
define('DRUPAL_ROOT', getcwd());
require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
require_once 'includes/password.inc';
echo user_hash_password('givenpassword');
die();
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment