lib/rpx_now.rb in dbalatero-rpx_now-0.4.1 vs lib/rpx_now.rb in dbalatero-rpx_now-0.4.2
- old
+ new
@@ -113,10 +113,11 @@
def read_user_data_from_response(response)
user_data = response['profile']
data = {}
data[:identifier] = user_data['identifier']
data[:email] = user_data['verifiedEmail'] || user_data['email']
- data[:name] = user_data['displayName'] || user_data['preferredUsername'] || data[:email].sub(/@.*/,'')
+ data[:username] = user_data['preferredUsername'] || data[:email].sub(/@.*/,'')
+ data[:name] = user_data['displayName'] || data[:username]
data[:id] = user_data['primaryKey'] unless user_data['primaryKey'].to_s.empty?
data
end
def secure_json_post(url,data={})