Cara Reset Password Drupal 7 via PHPMyAdmin
Posted on September 10, 2012 by tkjcorner
Berikut adalah langkah demi langkah untuk mengganti atau update password Drupal kita melalui PHPMyAdmin
Step 1
Buat file php dengan nama pass_reset.php yang berisi kode sebagai berikut:
1
2
3
4
5
6
7
8
9
| <?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( 'password_baru' ); die (); menu_execute_active_handler(); ?> |
Step 2
Upload file pass_reset.php tersebut di folder root web drupal kita
Step 3
Buka browser, kemudian buka file php yang telah kita upload misal: http://contoh.com/pass_reset.php atau localhost/drupal/pass_reset.php. Maka akan muncul kode hash password.
$S$DoeSjCz2CsjPluCcAhHSuAF6SCfi7ZYiLyzMHCnCV8UoBMuwgdEz
(kode diatas adalah kode hash dari password_baru)
Copy semua kode tersebut.
Step 4
Buka phpmyadmin, cari database web drupal kita. Pada table users kolom pass ganti dengan kode hash password yang telah kita copy sebelumnya
Step 5
Login seperti biasa dengan password baru kita yaitu password_baru (bukan dengan kode hash password)
Step 6
Hapus file reset_pass.php dari server web kita karena sudah tidak kita butuhkan.
Selamat mencoba, semoga berhasil..:-)