Guest User

Untitled

a guest
Jan 24th, 2018
282
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.67 KB | None | 0 0
  1. <?
  2.  
  3.         $password = $_POST['password'];
  4.         $username = $email;
  5.         $hash = phpbb_hash($password);
  6.         //echo($hash);
  7.        
  8.         if (phpbb_check_hash($password, $hash))
  9. {
  10.               //echo(' => $password matches $hash');
  11. }
  12.         $ip = $_SERVER['REMOTE_ADDR'];
  13.         $username = $_POST['email'];
  14.         $email = $_POST['email'];
  15.         $emailh = (int) (crc32(strtolower($email)) . strlen($email));
  16.         //echo($emailh);
  17.         $conn2 = mysql_connect("localhost", "njfailc1_dev", "123123123");
  18.         mysql_select_db("njfailc1_erbohforum",$conn2);
  19.  
  20.         $sql2 = "INSERT INTO `phpbb_users` (`user_type`, `group_id`, `user_permissions`, `user_perm_from`, `user_ip`, `user_regdate`, `username`, `username_clean`, `user_password`, `user_passchg`, `user_pass_convert`, `user_email`, `user_email_hash`, `user_birthday`, `user_lastvisit`, `user_lastmark`, `user_lastpost_time`, `user_lastpage`, `user_last_confirm_key`, `user_last_search`, `user_warnings`, `user_last_warning`, `user_login_attempts`, `user_inactive_reason`, `user_inactive_time`, `user_posts`, `user_lang`, `user_timezone`, `user_dst`, `user_dateformat`, `user_style`, `user_rank`, `user_colour`, `user_new_privmsg`, `user_unread_privmsg`, `user_last_privmsg`, `user_message_rules`, `user_full_folder`, `user_emailtime`, `user_topic_show_days`, `user_topic_sortby_type`, `user_topic_sortby_dir`, `user_post_show_days`, `user_post_sortby_type`, `user_post_sortby_dir`, `user_notify`, `user_notify_pm`, `user_notify_type`, `user_allow_pm`, `user_allow_viewonline`, `user_allow_viewemail`, `user_allow_massemail`, `user_options`, `user_avatar`, `user_avatar_type`, `user_avatar_width`, `user_avatar_height`, `user_sig`, `user_sig_bbcode_uid`, `user_sig_bbcode_bitfield`, `user_from`, `user_icq`, `user_aim`, `user_yim`, `user_msnm`, `user_jabber`, `user_website`, `user_occ`, `user_interests`, `user_actkey`, `user_newpasswd`, `user_form_salt`, `user_new`, `user_reminded`, `user_reminded_time`) VALUES ('0', '2', '', '0', '$ip', '1317595023', '$email', '$email', '$hash', '1318958686', '', '$email', '$emailh', '', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', 'en', '0.00', 0, 'd M Y H:i', '3', '0', '', '0', '0', '0', '0', '-3', '0', '0', 't', 'd', '0', 't', 'a', '0', '1', '0', '1', '1', '1', '0', '', '', '0', '0', '0', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'cce2c34247f7a1ec', '1', '0', '0')";
  21.         error_reporting (E_ALL ^ E_NOTICE);
  22.        
  23.         $result1 = mysql_query($sql2, $conn2) or die(mysql_error()); //this is where you'd want the id from... still dont get it.
  24.         $phpbbUser=mysql_insert_id($conn2);
  25.         $uid = "INSERT INTO phpbb_user_group (group_id, user_id, user_pending) VALUES (2, '$phpbbUser', 0)";
  26.         $result3 = mysql_query($uid, $conn2) or die(mysql_error());
  27. ?>
Add Comment
Please, Sign In to add comment