Exemple #1
0
                $vbulletin->url = $vbulletin->options['forumhome'] . '.php' . $vbulletin->session->vars['sessionurl_q'];
                print_standard_redirect(array('redirect_updatethanks', $vbulletin->userinfo['username']));
            }
        } else {
            if ($vbulletin->GPC['nolink']) {
                $vbulletin->url = $vbulletin->options['forumhome'] . '.php' . $vbulletin->session->vars['sessionurl_q'];
                print_standard_redirect(array('redirect_updatethanks', $vbulletin->userinfo['username']));
            }
        }
    }
}
// ############################### start register ###############################
if ($_REQUEST['do'] == 'register') {
    // check the conditions are right for auto-register, logged in fb user/
    // not logged into vB, no associated account, and email permissions available
    if (is_facebookenabled() and vB_Facebook::instance()->userIsLoggedIn() and empty($vbulletin->userinfo['userid']) and !vB_Facebook::instance()->getVbUseridFromFbUserid() and $vbulletin->options['facebookautoregister'] and check_emailpermissions()) {
        // instantiate the data manager class
        $userdata =& datamanager_init('user', $vbulletin, ERRTYPE_ARRAY);
        // populate the datamanager with auto reg data
        save_fbautoregister($userdata);
        ($hook = vBulletinHook::fetch_hook('register_addmember_process')) ? eval($hook) : false;
        // if there were errors in the association code
        // go back to the association form and display errors
        $userdata->pre_save();
        if (!empty($userdata->errors)) {
            $_REQUEST['do'] = 'register';
            $errorlist = '';
            foreach ($userdata->errors as $index => $error) {
                $errorlist .= "<li>{$error}</li>";
            }
            $show['errors'] = true;
Exemple #2
0
		$vbulletin->url = 'forum.php' . $vbulletin->session->vars['sessionurl_q'];
		eval(print_standard_redirect('redirect_updatethanks'));
	}
}

// ############################### start register ###############################
if ($_REQUEST['do'] == 'register')
{
	// check the conditions are right for auto-register, logged in fb user/
	// not logged into vB, no associated account, and email permissions available
	if (is_facebookenabled()
		AND vB_Facebook::instance()->userIsLoggedIn()
		AND empty($vbulletin->userinfo['userid'])
		AND !vB_Facebook::instance()->getVbUseridFromFbUserid()
		AND $vbulletin->options['facebookautoregister']
		AND check_emailpermissions())
	{
		// instantiate the data manager class
		$userdata =& datamanager_init('user', $vbulletin, ERRTYPE_ARRAY);

		// populate the datamanager with auto reg data
		save_fbautoregister($userdata);
		
		($hook = vBulletinHook::fetch_hook('register_addmember_process')) ? eval($hook) : false;

		// if there were errors in the association code
		// go back to the association form and display errors
		$userdata->pre_save();
		if (!empty($userdata->errors))
		{
			$_REQUEST['do'] = 'register';