module Devise::Models::DatabaseAuthenticatable

def authenticatable_salt

A reliable way to expose the salt regardless of the implementation.
def authenticatable_salt
  encrypted_password[0,29] if encrypted_password
end