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 7054265
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:36:20+00:00 2026-05-28T03:36:20+00:00

My form will have Current password: New password: Confirm new password: I’m trying to

  • 0

My form will have

Current password:
New password:
Confirm new password:

I’m trying to think of the best way to implement this. How would I confirm that the current password is correct but in the same form that will update my password?

I have my authenticate method which I can pass the current_user’s email into along with the password to confirm the current password but then how would I continue and update with the same form? How will it know that the current password has been confirm.

This seems like a basic thing to do but my mind feels like it’s reached a road block.

Advice, tips greatly appreciated.

Kind regards.

  • 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-05-28T03:36:21+00:00Added an answer on May 28, 2026 at 3:36 am

    “How would I confirm that the current password is correct but in the same form that will update my password?”

    The best way is to use Devise, Clearance, Authlogic or another gem and use the examples for them.

    That said if you roll your own but are stumped on password change, a couple of ways are:

    Submit the form (standard form submission) and if the password change works, change what you display next time around, preferable through simple flags, set in the controller that control what the view shows in the view form.

    Submit the form (ajax) and if the password change works, use javascript (say jQuery) to change what the view is showing – hide the password fields and show the other fields you want again setting simlpe flag to control the display in the… controller.
    You can use rjs to replace_html, etc. the pieces you want.

    For other readers of this answer (the OP probably already knows this), if the password is hashed for security, e.g. MD5, and I’ll assume it is, then you can’t know what it is, but you can hash an attempt and compare to the hashed version (stored in the database) and if they match the user has provided they are the same.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to make a user-registration form where I will have fields such first
i have an form which will send some data to an php file ,
I have a asp.net web form which will submit information to come as emails.
(Using MySQL and PHP) I have a search form that will allow my users
The functionality I'm looking for: I have a form that will search my 'Proposal'
I have a form in my application that will fill using Unicode characters (Non
I have created a form with knockout that will allow the ability to give
I have a delete form wherein the user will enter the pnum to be
Javascript I have code that will hide various sections in a MS CRM form
I have a form where you may press a button which will give you

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.