/includes/ucp/ucp_register.php shows this code starting at line 336:
Code: Select all
// Instantiate passwords manager
$passwords_manager = $phpbb_container->get('passwords.manager');
$user_row = array(
'username' => $data['username'],
'user_password' => $passwords_manager->hash($data['new_password']),
'user_email' => $data['email'],
'group_id' => (int) $group_id,
'user_timezone' => $data['tz'],
'user_lang' => $data['lang'],
'user_type' => $user_type,
'user_actkey' => $user_actkey,
'user_ip' => $user->ip,
'user_regdate' => time(),
'user_inactive_reason' => $user_inactive_reason,
'user_inactive_time' => $user_inactive_time,
);
The password manager hash function can be found in /phpbb/passwords/manager.php. You will notice a driver folder in this directory. There are a number of encryption algorithms. It's unclear to me which one is the default encryption algorithm, but is some sense it doesn't matter. The key is to use this line of code:
Code: Select all
$passwords_manager->hash($data['new_password']),
To validate a password you need the validate_password function at line 1794 in /includes/functions_user.php. So you will need to include this file in your program.
Need phpBB services or a phpBB consultant?
I offer most phpBB services. Getting lost managing phpBB? Buy my book,
Mastering phpBB Administration. Covers through phpBB 3.3.7.
eBook and
paper versions available.