mirror of
https://github.com/discourse/discourse.git
synced 2026-08-26 21:27:16 -05:00
Added test case for nickname registration failure
* Also made a minor readability change by moving the auth.present? check * from UsersController#create into #create_third_party_auth_records * which is the method that relies on the check.
This commit is contained in:
@@ -167,7 +167,7 @@ class UsersController < ApplicationController
|
||||
if user.save
|
||||
activator = UserActivator.new(user, session, cookies)
|
||||
message = activator.activation_message
|
||||
create_third_party_auth_records(user, auth) if auth.present?
|
||||
create_third_party_auth_records(user, auth)
|
||||
|
||||
# Clear authentication session.
|
||||
session[:authentication] = nil
|
||||
@@ -408,6 +408,8 @@ class UsersController < ApplicationController
|
||||
end
|
||||
|
||||
def create_third_party_auth_records(user, auth)
|
||||
return unless auth.present?
|
||||
|
||||
if twitter_auth?(auth)
|
||||
TwitterUserInfo.create(
|
||||
user_id: user.id,
|
||||
|
||||
Reference in New Issue
Block a user