mirror of https://github.com/docusealco/docuseal
				
				
				
			
			You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							21 lines
						
					
					
						
							436 B
						
					
					
				
			
		
		
	
	
							21 lines
						
					
					
						
							436 B
						
					
					
				# frozen_string_literal: true
 | 
						|
 | 
						|
class SessionsController < Devise::SessionsController
 | 
						|
  def create
 | 
						|
    if Docuseal.multitenant? && !User.exists?(email: sign_in_params[:email])
 | 
						|
      return redirect_to new_registration_path(sign_up: true, user: sign_in_params.slice(:email)),
 | 
						|
                         notice: 'Create a new account'
 | 
						|
    end
 | 
						|
 | 
						|
    super
 | 
						|
  end
 | 
						|
 | 
						|
  private
 | 
						|
 | 
						|
  def require_no_authentication
 | 
						|
    super
 | 
						|
 | 
						|
    flash.clear
 | 
						|
  end
 | 
						|
end
 |