its like phpbb_hash makes a random salt in the password
Greetings , kevin
]]>I tried your modified code and it works fine for me. Thank you to all here.
]]> // get some functions from phpBB3
define(‘IN_PHPBB’, true);
$phpbb_root_path = ‘../phpBB/’;
$phpEx = substr(strrchr(__FILE__, ‘.’), 1);
include($phpbb_root_path . ‘common.’ . $phpEx);
// Start session management
$user->session_begin();
$auth->acl($user->data);
include($phpbb_root_path .’includes/functions_user.php’);
//$user->setup();
$user_row = array(
‘username’ => ‘testtest’,
‘user_password’ => md5(‘test’),
‘user_email’ => ‘test@test.com’,
‘group_id’ => 2,
‘user_timezone’ => 0,
‘user_dst’ => 1,
‘user_lang’ => ‘en’,
‘user_type’ => 0,
‘user_actkey’ => ”,
‘user_dateformat’ => ‘D M d, Y g:i a’,
‘user_style’ => 1,
‘user_regdate’ => time(),
);
/* Now Register user */
$phpbb_user_id = user_add($user_row);
echo $phpbb_user_id.’ finished’;
$phpbb_root_path = ‘phpBB3/’;
]]>part from the code
]]>define(‘IN_PHPBB’, true);
session_start();
global $config, $db, $user, $auth, $template, $phpbb_root_path, $phpEx;
/* the file with the actual goodies */
$phpbb_root_path = (defined(‘PHPBB_ROOT_PATH’)) ? PHPBB_ROOT_PATH : ‘./’;
$phpEx = substr(strrchr(__FILE__, ‘.’), 1);
include($phpbb_root_path . “includes/functions_user.” . $phpEx);
include($phpbb_root_path . “includes/functions.” . $phpEx);
include($phpbb_root_path . “common.” . $phpEx);
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();
$username = “proba”;
$password = “proba”;
$email = “email@eml.hu”;
$user_inactive_reason = 0;
$user_inactive_time = 0;
$user_type = USER_NORMAL;
$user_row = array(
“username” => $username,
“user_password” => phpbb_hash($password),
“user_email” => $email,
“group_id” => 2, #Registered users group
“user_timezone” => 1.00,
“user_dst” => 1,
“user_lang” => “hu”,
“user_type” => $user_type,
“user_actkey” => ”,
“user_dateformat” => “D M d, Y g:i a”,
“user_style” => 1,
“user_regdate” => time(),
“user_inactive_reason” => $user_inactive_reason,
“user_inactive_time” => $user_inactive_time,
);
/* Now Register user */
$phpbb_user_id = user_add($user_row);
echo “finished”;
]]>