How to manually generate the Password to insert in the user table
Created 7 years ago by srinivas214Hi, If i manually insert the user record in the users_users table, I would need to encrypt the password and insert, Is there a way to generate the password manually using any of the Pyrocms functions. Please help me to get this. Thanks
ryanthompson
—
7 years ago
Use the UserRepository
or the UserModel
and you won't have to hash yourself: https://github.com/anomalylabs/users-module/blob/2.4/src/User/UserModel.php#L238
UserModel::create($data); // For example
Same with manually updating the value:
$user->password = "Top Secret";
$user->save();
ryanthompson
—
7 years ago
squatto
—
7 years ago
@ryanthompson Yes you do! More of these
Just use
bcrypt('password here')