I'm trying to implement a new user login page that will register the user into a Sharetronix system and the myBB forum at the same time. I was able to get it to work; however, after the user clicks "Submit" on the form it shows the actual array information. MyBB has a page integration page (class.MyBBIntegrator.php)that someone created that helps with the new user process...Anyways, I was wondering if there was a way to hide the array information and just "do it" behind the scenes. I do like the note saying i'm registered, not, password issue, etc BUT I don't want to show the end user the array part.
Code: Select all
//define, open files, declare mybbi
define('IN_MYBB', NULL);
require_once '../forum/global.php';
require_once '../forum/inc/class.MyBBIntegrator.php';
$MyBBI = new MyBBIntegrator($mybb, $db, $cache, $plugins, $lang, $config);
//declare the registration array for the forum
$info = array(
'username' => $_POST[username],
'password' => $_POST[password],
'password2' => $_POST[password],
'email' => $_POST[email],
'email2' => $_POST[email],
'hideemail' => 1,
'invisible' => 0,
'receivepms' => 1
);
//declare registration status along with registering user
$register_status = $MyBBI->register($info);
// Array means: registering failed
if (is_array($register_status))
{
echo implode('<br />', $register_status);
}
else
{
echo $register_status;
Code: Select all
Array
(
[username] => Jason
[password] => jason
[password2] => jason
[email] => jason@dajman.com
[email2] => jason@dajman.com
[hideemail] => 1
[invisible] => 0
[receivepms] => 1
[referrer] =>
[timezone] =>
[language] =>
[profile_fields] =>
[allownotices] =>
[subscriptionmethod] =>
[pmnotice] =>
[emailpmnotify] =>
[dstcorrection] =>
)
The username you entered already exists. Please enter a different username.
The password you entered is of invalid length. Please enter a password between 6 and 30 characters.
You have entered an email address that is already in use by another member. Please enter a different email address.
Thanks, Jason