jeudi 7 avril 2016

I want to change the behavior of find_for_database_authentication in refinerycms User model

I want to change the condtion in refinerycms user model. But user.rb in gem file so how i can do that.

I also try to override but not working for me.

class << self
  def find_for_database_authentication(conditions)
    value = conditions[authentication_keys.first]
    where(["username = :value OR email = :value", { :value => value }]).first
 end
end

Kindly guide me.

Aucun commentaire:

Enregistrer un commentaire