I need to integrate a users
table instead of the default Joomla _user
table.
The table pref_users
has simple id/user/email/password fields (not hashed). Is there anyway I can make Joomla use it instead of the default table for users?
Joomla Stack Exchange is a question and answer site for Joomla! administrators, users, developers and designers. It only takes a minute to sign up.
Sign up to join this communityYou can check user helper file in Joomla! library {site_root}/libraries/user/helper.php
You will find all related functions over there. To convert pain text to hash password there is a function called getCryptedPassword
. This function accepts several arguments. In most cases default arguments works perfectly, but You can use them as per your need.
With default argument:
$passwordhash = JUserHelper::getCryptedPassword('plain_text_password');
getCryptedPassword
by default uses md5_hex
, so seeing as this is Joomla 3.x, should the OP not be used JUserHelper::hashPassword('plan_text')
?
crypt-blowfish
in argument.
Apr 4, 2015 at 12:24
#__users
table and then run a simple PHP script to hash each password. Joomla is CMS, therefore you're supposed to use what's built into it. Don't start changing the way it works. If you need anything extra, then built on top of what is already providedbcrypt
. Run a database query to get all the passwords, then in aforeach
loop, use the bcrypt function.