Drupal7 - Customize the search form
Here is the code to be used in the theme's template.php file that will override Drupal's search form.
If no template.php is available, just go ahead and create one.
Alternatively, a print_r should work just fine:
More info: http://php.net/manual/en/function.get-defined-vars.phpThere are many solutions out there to reset User 1's password in a Drupal 7 website. A really convenient way is to use Drush, to generate a one time login URL - no mails involved. The output would be directly on the console, and it is simple to just copy and paste it in a browser.
The drush command is the following:
drush php-eval 'echo user_pass_reset_url(user_load(1));
and once logged in, the password can be easily changed in the user edit screen.
Please remember to clear the cache in order for the changes to trigger.
<?php function MYMODULE_send_file($fid) {
$file = db_fetch_object(db_query("SELECT * FROM {files} WHERE fid = %d", $fid));
if ($file) {
$my_path = $_SERVER['DOCUMENT_ROOT'] .'/'.$file->filepath;
header("Pragma: public");
header("Expires: 0");
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: pre-check=0, post-check=0, max-age=0', false);
header('Last-Modified: '.gmdate('D, d M Y H:i:s') .?>
In case the following error comes up:
Error: 1248 - SQLSTATE: 42000 ER_DERIVED_MUST_HAVE_ALIAS