Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8676699
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T20:15:52+00:00 2026-06-12T20:15:52+00:00

I am using devise for authentication. If the email already exists it logs the

  • 0

I am using devise for authentication.
If the email already exists it logs the user in.
If the email does not exist then it creates a new user using those credentials.
there should be only one submit button and a field for email and password.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T20:15:54+00:00Added an answer on June 12, 2026 at 8:15 pm

    that is possible for that have to write condition for that in your controller

    for example

    def create
     @user = @user.find_or_create_by(params[:user])
     ....
     ....
    end
    

    or

    def create
      @user = User.find(params[:user])
      unless @user.present?
        @user = User.new(params[:user])
        if @user.valid?
          ...
        else 
          ...
       end
     end
    end
    

    or # for devise – in registration controller

    def create
      @user = User.find_by_email(params[:user][:email])
      if @user.present? 
        sign_in(resource_name, resource)
      else
        if resource.save
          if resource.active_for_authentication?
           ...
           ...
          else
           ...
           ...
          end
        else
          ...
          ...
        end
      end
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I am using Devise for user authentication in my rails app. I have
I'm using Devise for authentication in my application. I don't want to require email
I would like to NOT require email for signing in using devise. I removed
I am using devise for authentication and i want only user named admin having
UPDATED I'm using Devise 1.4.9 for authentication and my Devise-generated User model doesn't seem
We have a working app using Devise for authentication (email, password). To add the
I'm using Devise for user authentication and basic authentication. Let's say I have defined
I'm using devise 1.1.RC0 for user authentication in a rails 3.0.0 app. Due to
I am using devise to manage user authentication in my rails app. Devise is
I'm new to Devise and have it working fine by using an email address

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.