we are making a few web services for a Drupal 7 based websites. in that webservice, one task is to sign up new users on that website.

the only main issue at the moment for this task is to access the drupal hash function in a php code file that is not inside the drupal's installation directory.

any guidance on how to achieve this will be highly appreciated.

1 Answer 1


What you'll need is Drupal's password.inc file, located at: /includes/password.inc

Just copy this file to your project and include it in your custom php file. This way you can use the user_check_password() function (and many others).

here is a good example of something like you are trying to do in Laravel 4. http://www.goodbytes.be/blog/article/create-a-custom-drupal-7-authentication-driver-provider-in-laravel-4

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.