Skip to content

VDMi/devise-drupal

Repository files navigation

Devise Drupal

Build Status

Drupal Hash implementation for Devise Encryptable.

Usage

Add it to your Gemfile

gem "devise-drupal"

Follow the device-encryptable readme.

Add the password_salt methods to your model:

class User < ActiveRecord::Base
  def password_salt
    'no salt'
  end

  def password_salt=(new_salt)
  end
end

Add the encryptor to your initializor

# This on top of your file:
require Rails.root.join('lib', 'devise', 'encryptable', 'encryptors', 'drupal_hash')

# This inside your "Devise.setup do |config|"
config.encryptor = :drupal_hash

Beware: updating your encryptor on a database will make the current passwords unusable!

And you're ready to go!

Contributing

  • Fork it
  • Write your changes
  • Commit
  • Send a pull request

License

GNU GENERAL PUBLIC LICENSE Version 2. 2014 .VDMi/ http://www.vdmi.nl

About

Devise Encryptable Drupal Hash implementation, creates and compares Drupal hashes.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages