<commit_before>module Pbw
	class RegistrationsController < Devise::RegistrationsController
		respond_to :json

		def create
			build_resource(sign_up_params)

			if resource.save
				if resource.active_for_authentication?
					sign_up(resource_name, resource)
					Pbw::Engine.user_lifecycle_class.after_signup(current_user)
					render json: current_user
				else
					expire_session_data_after_sign_in!
					head :no_content
				end
			else
				clean_up_passwords resource
				render json: resource.errors.full_messages, status: :unprocessable_entity
			end
		end

		def sign_up_params
		    devise_parameter_sanitizer.for(:user)
		end
	end
end<commit_msg>Custom devise controllers<commit_after>module Pbw
	class RegistrationsController < Devise::RegistrationsController
		respond_to :json

		def create
			build_resource(params[:user])

			if resource.save
				if resource.active_for_authentication?
					sign_up(resource_name, resource)
					Pbw::Engine.user_lifecycle_class.after_signup(current_user)
					render json: current_user
				else
					expire_session_data_after_sign_in!
					head :no_content
				end
			else
				clean_up_passwords resource
				render json: resource.errors.full_messages, status: :unprocessable_entity
			end
		end
	end
end
{'fraction_non_alphanumeric': 0.05338645418326693, 'fraction_numerical': 0.0, 'mean_word_length': 4.2552301255230125, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3862701', 'n_tokens_mistral': 494, 'n_tokens_neox': 390, 'n_words': 79}