Can't login with the new user, so something is not right. But what?You have specified an incorrect username. Please check your username and try again. If you continue to have problems please contact the Board Administrator.
Code: Select all
//add to db
$db = helper::db();
$query = "INSERT INTO phpbb_users SET
user_id='$id',
group_id='2',
user_lang='nl',
user_timezone='Europe/Amsterdam',
user_notify='1',
user_style='1',
user_form_salt='a7e0f2f19898c073',
username='$name',
user_avatar='$avatar',
user_avatar_width='150',
user_avatar_height='150'";
$db->query($query);
//add user to group
$query = "INSERT INTO phpbb_user_group SET
group_id='2',
user_id='$id'";
$db->query($query);
thank you. But to use that function I seem to need to include the framework. Having trouble with that.RMcGirr83 wrote:and the function group_user_add as well
btw, the function is actually in the includes/functions_user.php file
Code: Select all
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
require_once(dirname(__FILE__).'/../common.php');
Code: Select all
Warning: require(./includes/startup.php): failed to open stream: No such file or directory in E:\_websites\phpbb\common.php on line 23
Warning: require(./includes/startup.php): failed to open stream: No such file or directory in E:\_websites\phpbb\common.php on line 23
Fatal error: require(): Failed opening required './includes/startup.php' (include_path='.;C:\php\pear') in E:\_websites\phpbb\common.php on line 23
Code: Select all
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : dirname(__FILE__).'/../';
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/di/container_builder.php on line 292: file_put_contents([ROOT]/_import/../cache/container_[ROOT]/_importslashdotdotslash.php): failed to open stream: Invalid argument
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : '../';
?Code: Select all
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : '../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
require_once(dirname(__FILE__).'/../common.php');
require_once(dirname(__FILE__).'/../includes/functions_user.php');
$user_row['username'] = $name;
$user_row['group_id'] = '2';
$user_row['user_email'] = '[email protected]';
$user_row['user_type'] = '0';
user_add($user_row);
no need to call that as the function user_add seems to deal with that as well.RMcGirr83 wrote:and the function group_user_add as well
So the user can login, but not get a password-reminder!?The email/username information submitted could not be found.
Code: Select all
global $phpbb_container;
// Instantiate passwords manager
$passwords_manager = $phpbb_container->get('passwords.manager');
Code: Select all
$passwords_manager->hash($foo['new_password'])