app/models/twitter_auth/oauth_user.rb in mbleigh-twitter-auth-0.1.20 vs app/models/twitter_auth/oauth_user.rb in mbleigh-twitter-auth-0.1.21

- old
+ new

@@ -11,9 +11,11 @@ module ClassMethods def identify_or_create_from_access_token(token, secret=nil) raise ArgumentError, 'Must authenticate with an OAuth::AccessToken or the string access token and secret.' unless (token && secret) || token.is_a?(OAuth::AccessToken) + token = OAuth::AccessToken.new(TwitterAuth.consumer, token, secret) unless token.is_a?(OAuth::AccessToken) + response = token.get(TwitterAuth.path_prefix + '/account/verify_credentials.json') user_info = handle_response(response) if user = User.find_by_twitter_id(user_info['id'].to_s) user.login = user_info['screen_name']