Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

skipping password and email validation #5

Open
justinvj15 opened this issue Apr 29, 2011 · 0 comments
Open

skipping password and email validation #5

justinvj15 opened this issue Apr 29, 2011 · 0 comments

Comments

@justinvj15
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant