![]() |
Ok, this should sound stupid, but can I somehow not allow people to login with their facebook accounts but just allow existing members to associate their facebook accounts to be associated with the forum so that their updates are posted to facebook ?
|
When users try to login they get:
Code:
facebook == null) $vbulletin->facebook = new Facebook($vbulletin->options['fbconnect_apikey'], $vbulletin->options['fbconnect_secret']); $facebook = $vbulletin->facebook; $fbuid = intval($vbulletin->facebook->get_loggedin_user()); if ($fbuid > 0) { $vbuser = $db->query_first(" SELECT userid FROM " . TABLE_PREFIX . "fbuser AS fbuser WHERE fbuid = " . $fbuid . " LIMIT 1 "); if ($vbuser['userid']) { $vbulletin->userinfo = $vbulletin->db->query_first("SELECT userid, usergroupid, membergroupids, infractiongroupids, username, password, salt FROM " . TABLE_PREFIX . "user WHERE userid = '" . $vbuser['userid'] . "'"); if ($vbulletin->userinfo['username']) { //set coockies vbsetcookie('userid', $vbulletin->userinfo['userid'], true, true, true); vbsetcookie('password', md5($vbulletin->userinfo['password'] . COOKIE_SALT), true, true, true); //login vb user process_new_login('', true, ''); $path_parts = pathinfo(parse_url($vbulletin->url, PHP_URL_PATH)); if ($path_parts['basename'] == 'fblogin.php') $vbulletin->url = $vbulletin->options['forumhome'] . '.php'; // do redirect if (!is_array($vbphrase)) $vbphrase = array(); do_login_redirect(); } else { $db->query_write("DELETE FROM " . TABLE_PREFIX . "fbuser WHERE fbuid = $fbuid"); $templatename = 'fbconnect_login'; } } else { //request username to create a new vb user $templatename = 'fbconnect_login'; } } else { eval(standard_error(fetch_error('badlogin', $vbulletin->options['bburl'], $vbulletin->session->vars['sessionurl']))); } if ($_GET['do'] == 'login') { $templatename = 'fbconnect_loginform'; } if ($_POST['do'] == 'addmember') { $vbulletin->input->clean_array_gpc('p', array( 'username' => TYPE_STR )); if (!$vbulletin->options['allowregistration']) { eval(standard_error(fetch_error('noregister'))); } $fbuserinfo = $facebook->api_client->users_getInfo($fbuid, array('proxied_email')); $fbuserinfo = $fbuserinfo[0]; // init user datamanager class $userdata =& datamanager_init('User', $vbulletin, ERRTYPE_ARRAY); if ($vbulletin->options['moderatenewmembers']) { $newusergroupid = 4; } else { $newusergroupid = ((intval($vbulletin->options['fbconnect_defaultgroup']) > 0) ? $vbulletin->options['fbconnect_defaultgroup'] : 2); } $userdata->set('username', $vbulletin->GPC['username']); //generate random password $userdata->set('password', generate_password()); // set usergroupid $userdata->set('usergroupid', $newusergroupid); // set languageid $userdata->set('languageid', $vbulletin->userinfo['languageid']); // set user title $userdata->set_usertitle('', false, $vbulletin->usergroupcache["$newusergroupid"], false, false); // register IP address $userdata->set('ipaddress', IPADDRESS); $userdata->pre_save(); // check for errors if (!empty($userdata->errors)) { $_REQUEST['do'] = 'register'; $errorlist = ''; foreach ($userdata->errors AS $index => $error) { $errorlist .= " |
Quote:
|
This looks really terrific.
I just added it to my test board, and all seems "OK". I have my registrations set to require a unique email, but when I used fb connect it allowed the same email to be used. I'd prefer it doesn't do this for two reason. I use the emails in the db to send weekly newsletters, and the fb connect user has something like this for an address: apps+99999999.582092222.a93a84ca74f609c6f517ec9635 9e1708@proxymail.facebook.com. Clearly I can't send to an email like that. Secondly, not all users of my site are computer savvy. I'd prefer not to have the same person register again thinking this is needed in addition to a normal registration. Is there a way to overcome these issues? Also, how do you select an account in the forum that alreay exists when logging in with fb? |
turkıs ınstall pls help me
|
Can existing forum members associate their vbulletin account with their facebook account?
|
Database error when replying or quoting to a message:
Code:
Database error in vBulletin 3.7.4: I am not able to upgrade my DB version as I am depending on my hosting provider. They can not upgrade yet because of compatibility issues. So... what to do / how to solve this? |
Quote:
|
Quote:
you shouldnt get a sql error! give thoughs two a go andthen get back :D |
Quote:
unce benimki calismadi kodler yanlis yuptim bak asader benim code Code:
<script type="text/javascript"> Code:
<script type="text/javascript"> tekra bakasen o calismiyor bi tekra buray gelsin be bukim ben tekra sogle ozur benim turkce cok eski |
All times are GMT. The time now is 09:15 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|