Answer the question
In order to leave comments, you need to log in
How to disable recapcha on a website (Drupal 7) via DB?
The task was to transfer the site to a new hosting and domain. The administrator password has been lost.
The site has been moved, everything works, but in order to restore the admin password, you need to go through the captcha, but the API key does not fit, which is logical, since the domain is new. I need to somehow disable the captcha or change the key without having access to the admin panel.
I found in the system table where the module parameters are most likely stored, but I don’t understand how they can be edited, since they are in the blob
. There are accesses to FTP and MySQL. What ideas might there be?
Answer the question
In order to leave comments, you need to log in
UPDATE system
SET status = 0
WHERE filename = 'sites/all/modules/recaptcha/recaptcha.module';
TRUNCATE cache;
TRUNCATE cache_bootstrap;
1. Create a script in the site root that will call the user_hash_password function to generate a password hash.
Below is an example of the contents of the script.
<?php
define('DRUPAL_ROOT', getcwd());
require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
require_once DRUPAL_ROOT . '/includes/password.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
echo user_hash_password('ВАШ_ПАРОЛЬ');
die();
UPDATE users
SETpass = '$S$DMzbGJybGry6UAjAcC9nMMnZrbIT4sTsI7XigxY/SyXUOlsIaTek'
WHERE uid = 1
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question