diff --git a/app/api/mobile/apis/users.rb b/app/api/mobile/apis/users.rb index 96cec7b39..62376dc6e 100644 --- a/app/api/mobile/apis/users.rb +++ b/app/api/mobile/apis/users.rb @@ -37,7 +37,7 @@ module Mobile raise "此用户已经绑定过公众号, 请换一个帐户试试" if user.user_wechat - if uw && !user.real? + if uw && !uw.real? uw.migrate_user(user) else UserWechat.create!( @@ -69,7 +69,7 @@ module Mobile :should_confirmation_password => true) raise user.errors.full_messages.first if user.new_record? - if uw && !user.real? + if uw && !uw.real? user.update_attributes(:lastname=>uw.user[:lastname]) uw.migrate_user(user) else