Last active
March 20, 2019 20:46
-
-
Save madeingnecca/7646ba50f9f4540fb64ddbe9b2240d53 to your computer and use it in GitHub Desktop.
DRUPAL 7 - db query to show users data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
define('DRUPAL_ROOT', getcwd()); | |
require_once DRUPAL_ROOT . '/includes/bootstrap.inc'; | |
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); | |
drupal_bootstrap(DRUPAL_BOOTSTRAP_CONFIGURATION); | |
drupal_bootstrap(DRUPAL_BOOTSTRAP_DATABASE); | |
$result = db_query('SELECT * FROM users'); | |
foreach($result as $item) { | |
print $item->uid.' '; | |
print $item->name.' '; | |
print $item->mail.'<br />'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment