Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- define('IN_PHPBB', true);
- define('ROOT_PATH', "/phpBB3");
- function adduser ($username,$password,$email) {
- include "func/connectdb.php";
- if (!defined('IN_PHPBB') || !defined('ROOT_PATH')) {
- exit();
- }
- include_once "phpBB3/includes/functions.php";
- $phpEx = "php";
- $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : ROOT_PATH . '/';
- echo $phpbb_root_path;
- //include($phpbb_root_path . 'common.' . $phpEx);
- include "phpBB3/includes/common.php";
- $user->session_begin();
- $auth->acl($user->data);
- $hashedpass = phpbb_hash($password);
- echo $hashedpass;
- include($phpbb_root_path .'includes/functions_user.php');
- $user_row = array(
- 'username' => $username,
- 'user_password' => $hashedpass,
- 'user_email' => $email,
- 'group_id' => 2, #Registered users group
- 'user_type' => 0,
- );
- // Now Register user
- $phpbb_user_id = user_add($user_row);
- echo "<br>SUCCESS!";
- }
- $username = "addict3d";
- $pasword = "123123";
- $email = "iamjtr@gmail.com";
- $regok = adduser($username,$password,$email);
- ?>
Add Comment
Please, Sign In to add comment