Title: Drupal 7 hash
Last modified: October 8, 2020

---

# Drupal 7 hash

 *  Resolved [danilocubrovic](https://wordpress.org/support/users/danilocubrovic/)
 * (@danilocubrovic)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/drupal-7-hash/)
 * Can it be used with Drupal 7 hashed passwords?
    If can what I have to setup for“
   Password Hashing”. As I have figured out drupal 7 uses sha512 but in loop n times
   plus salt…

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [tbenyon](https://wordpress.org/support/users/tbenyon/)
 * (@tbenyon)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/drupal-7-hash/#post-13510299)
 * Hey [@danilocubrovic](https://wordpress.org/support/users/danilocubrovic/),
 * It certainly can but because [it appears Drupal uses a very custom approach](https://api.drupal.org/api/drupal/includes%21password.inc/function/user_check_password/7.x)
   to validate passwords, you would have to give the plugin the logic of validating
   your passwords.
 * This can be achieved by utilising this logic with the plugins `exlog_hook_filter_authenticate_hash`.
 * You can find documentation on how to use the hook in the [FAQ section](https://wordpress.org/plugins/external-login/#%0Awhat%20hooks%20are%20available%20in%20the%20external%20login%20flow%3F%0A)
   under the title “What hooks are available in the External Login flow?”.
 * You’ll need to do the dev work in making this work yourself (or find a developer
   who’s willing to write this custom implementation for you).
 * I’m going to mark this as resolved as I think I’ve answered your question but
   if you have any additional questions on how to use the hook or the plugin please
   don’t hesitate to get back to me. 🙂
 * Thanks [@danilocubrovic](https://wordpress.org/support/users/danilocubrovic/),
 * Tom 🙂
 *  Thread Starter [danilocubrovic](https://wordpress.org/support/users/danilocubrovic/)
 * (@danilocubrovic)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/drupal-7-hash/#post-13512853)
 * You point me in the right direction. I have solved it by adding drupal’s passord.
   inc file and your hook to use it for hash. Now it works well.
 * require “password.inc”;
 * function myExlogHashAuthenticator($password, $hashFromDatabase, $username, $externalUserData){
   
   $object = new stdClass(); foreach ($externalUserData as $key => $value){ $object-
   >$key = $value; } $amireal = user_check_password($password, $object); if ($amireal
   == TRUE) { return true; } return false; } add_filter(‘exlog_hook_filter_authenticate_hash’,‘
   myExlogHashAuthenticator’, 10, 4);
 *  Plugin Author [tbenyon](https://wordpress.org/support/users/tbenyon/)
 * (@tbenyon)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/drupal-7-hash/#post-13512862)
 * >  I have solved it by adding drupal’s passord.inc file
 * GREAT IDEA!!!
 * I’m sure others will find it useful so thanks for sharing back here.
 * If it all works I’d be grateful if you could [write a review](https://wordpress.org/support/plugin/external-login/reviews/#new-post)
   or even [buy me a beer](https://www.paypal.me/tombenyon).
 * Thanks,
 * Tom 🙂

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Drupal 7 hash’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/external-login_fbebd6.svg)
 * [External Login](https://wordpress.org/plugins/external-login/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/external-login/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/external-login/)
 * [Active Topics](https://wordpress.org/support/plugin/external-login/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/external-login/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/external-login/reviews/)

## Tags

 * [drupal](https://wordpress.org/support/topic-tag/drupal/)

 * 3 replies
 * 2 participants
 * Last reply from: [tbenyon](https://wordpress.org/support/users/tbenyon/)
 * Last activity: [5 years, 8 months ago](https://wordpress.org/support/topic/drupal-7-hash/#post-13512862)
 * Status: resolved