Guest User

Untitled

a guest
Jul 19th, 2018
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. <?php
  2. define('IN_PHPBB', true);
  3. define('ROOT_PATH', "/phpBB3");
  4.  
  5. function adduser ($username,$password,$email) {
  6. include "func/connectdb.php";
  7.  
  8.  
  9.  
  10. if (!defined('IN_PHPBB') || !defined('ROOT_PATH')) {
  11. exit();
  12. }
  13. include_once "phpBB3/includes/functions.php";
  14. $phpEx = "php";
  15. $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : ROOT_PATH . '/';
  16. echo $phpbb_root_path;
  17. //include($phpbb_root_path . 'common.' . $phpEx);
  18. include "phpBB3/includes/common.php";
  19.  
  20. $user->session_begin();
  21. $auth->acl($user->data);
  22.  
  23. $hashedpass = phpbb_hash($password);
  24. echo $hashedpass;
  25. include($phpbb_root_path .'includes/functions_user.php');
  26. $user_row = array(
  27. 'username' => $username,
  28. 'user_password' => $hashedpass,
  29. 'user_email' => $email,
  30. 'group_id' => 2, #Registered users group
  31. 'user_type' => 0,
  32. );
  33. // Now Register user
  34. $phpbb_user_id = user_add($user_row);
  35. echo "<br>SUCCESS!";
  36. }
  37.  
  38. $username = "addict3d";
  39. $pasword = "123123";
  40. $email = "iamjtr@gmail.com";
  41.  
  42. $regok = adduser($username,$password,$email);
  43. ?>
Add Comment
Please, Sign In to add comment