Get username / encrypt password
-
Hi,
I'm trying to get the current username / encrypt password of the current session during the mail validation in order to
store it in an other app database.Actually, when the mail is validate I can access my other database and store some static data.
But can't figure out how to get the user current username and encrypt password.I'm working inside the user/email.js inside the UserEmail.confirm.
Any tips or function I can use inside this file to retrieve user information ?
-
Why would you do this? You should never be storing the password in more than one database.
I think you seriously need to re-think the design of your app.
If you want to retrieve the hashed password. You need to call the database directly.
db.getObjectField('user:' + confirmObj.uid, 'password', function (err, password) { // Now you have the hashed password. })
Copyright © 2024 NodeBB | Contributors