D
D
DJDiM2019-10-17 18:43:06
css
DJDiM, 2019-10-17 18:43:06

How to change user password through mysql database?

It is necessary for the user to change the user's password through the mysql database, but I do not understand how it is hashed.
The password in the database starts with "$2y$10$"
How can I make my password look the same?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
profesor08, 2018-07-31
@yazeh

On the left is a select (or any drop-down list), in the middle is an input, on the right is a button. Give them a background and the right border. You can arrange it in a row by setting display:flex to the container.

.etot-element {
  display: flex;
}

<div class="etot-element">
  <select>
    <option>Browse</option>
    <option>Blabla</option>
  </select>
  <input type="text" placeholder="Search for Item...">
  <button><div class="search-icon"></div></button>
</div>

R
Ruslan Ruslanov, 2019-10-17
@dasauser

cached

hashed .
the simplest option:
1. register a new user newuser ( newuser is a new user, userchangepassword is a user whose password is being changed)
2. take the newuser password hash in the database 3. insert the newuser password hash instead of the old userchangepassword password hash 4. profit! Now the user userchangepassword has the password that you set for the user newuser , but this is the most stupid and simplest option. crutch, I would say. I do not advise anyone to do this if there are > 2 users in the database.
but normally you would need to implement the possibility of password recovery, by mail, number, or at least the answer to a secret question.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question