name = auth_info[:info][:name]
email = auth_info[:info][:email]
- case provider
- when "openid"
- email_verified = uid.match(%r{https://www.google.com/accounts/o8/id?(.*)}) ||
+ email_verified = case provider
+ when "openid"
+ uid.match(%r{https://www.google.com/accounts/o8/id?(.*)}) ||
uid.match(%r{https://me.yahoo.com/(.*)})
- when "google", "facebook"
- email_verified = true
- else
- email_verified = false
- end
+ when "google", "facebook"
+ true
+ else
+ false
+ end
if settings = session.delete(:new_user_settings)
current_user.auth_provider = provider
private
- ##
- #
- def unconfirmed_login(user)
- session[:token] = user.tokens.create.token
-
- redirect_to :action => "confirm", :display_name => user.display_name
-
- session.delete(:remember_me)
- session.delete(:referer)
- end
-
##
# update a user's details
def update_user(user, params)