I'm handling two websites a main one with a huge database and a secondary one, I want that when a user is created in the main one that it also creates it for the secondary one, I already connected the two databases and know how to handle all that, the issue is that Joomla requires the password of each user to be encrypted using the secret key in the configuration.php file. I know the plain password of each user, how would I go in order to encrypt them with php?
<?php $password = '12345'; $secret_key = 'FoOb4r'; $new_password = encrypt($password, $secret_key); // code to update 'password' in table_users to database with $new_password ?>
Also, I'm messing around just with '_users' table, I suppose I should update '_user_usergroup_map' as well. Is there another table I should take a look at?