Fix OpenID init. Refs #2261

This commit is contained in:
Pavel Chipiga 2011-12-06 21:57:03 +02:00
parent 701ccf54dd
commit 814a0a46fe
1 changed files with 1 additions and 1 deletions

View File

@ -50,7 +50,7 @@ class User < ActiveRecord::Base
def new_with_session(params, session)
super.tap do |user|
if data = session["devise.omniauth_data"]
if info = data['user_info'] and info.present?
if info = data['info'] and info.present?
user.email = info['email'].presence if user.email.blank?
user.uname ||= info['nickname'].presence || info['username'].presence
user.name ||= info['name'].presence || [info['first_name'], info['last_name']].join(' ').strip