I am a little confused by this question.
When a user enters his password on his website, you can assume that the value in $_POST['password'] (or whatever you call it) is in plain text. Even if the user uses the result of the hash function as their password, it doesn’t matter, since with respect to your application it still remains open. That is, the hashed value is the password of the user, no matter what steps they took to create it, since writing this value to the system leads to access for this user. The hash point of user passwords presented on the server is such that even you do not know what the user password is. Thus, if your database is compromised, the user password is not displayed.
Once you have a password, you will get this user salt and hashed password from the database. You accept the submitted form, hash it using a user-specific salt, and then compare it with the previously hashed password from the database. If the matched hashed and pre-hashed database values match, you can assume that the correct password has been entered.
The only reason I can understand what you are doing as you described is if you previously saved your passwords as plain text and now process them into hashes. In this case, you just need to assign a unique salt to each user, hash the current password + the plaintext salt, and save this as a new password. This conversion should happen immediately when "hashwords" is allowed, and not do it in parts as a user input for the first time after the transition.
source share