authlogic-connect-example
authlogic-connect-example copied to clipboard
skipping password and email validation
I am using authlogic for normal user signup,login and also authlogic connect for facebook and twitter signup,login.I need to skip password and email validation when the user signup using facebook and twitter. How should i implement it? Please help?
user model
acts_as_authentic do |c|
if Proc.new{|user|user.oauth_user}
c.validate_email_field = false
c.validate_password_field = false
end
end
def oauth_user !(self.authenticated_with?(:facebook) || self.authenticated_with?(:twitter)).nil? end