The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
vBulletin 4 Request - Error with functions_login.php
So, I'm trying to add new code to the function_login.php file. I'm using v4.2.5. The following is that I added after the verify_authentication section, which is:
Code:
// ###################### Start verify_gameAuth ####################### function verify_gameAuth($username, $password, $md5password, $md5password_utf, $cookieuser, $send_cookies) { global $vbulletin; $username = strip_blank_ascii($username, ' '); // See VBM-635: &#xxx; should be converted to windows-1252 extended char. This may not happen if a browser submits the form. But from API or user manually input, it does. // See also vB_DataManager_User::verify_username() $charset = strtolower(vB_Template_Runtime::fetchStyleVar('charset')) == 'iso-8859-1' ? 'windows-1252' : vB_Template_Runtime::fetchStyleVar('charset'); $callback = new Convert_unicode_char_to_charset_callback($charset); $username = preg_replace_callback( '/&#([0-9]+);/i', array($callback, 'callback'), $username ); if ($vbulletin->userinfo = $vbulletin->db->query_first("SELECT userid, usergroupid, membergroupids, joindate, infractiongroupids, username, password, salt FROM " . TABLE_PREFIX . "user WHERE username = '" . $vbulletin->db->escape_string(htmlspecialchars_uni($username)) . "'")) { if ( $vbulletin->userinfo['password'] != iif($password AND !$md5password, md5(md5($password) . $vbulletin->userinfo['salt']), '') AND $vbulletin->userinfo['password'] != iif($md5password, md5($md5password . $vbulletin->userinfo['salt']), '') AND $vbulletin->userinfo['password'] != iif($md5password_utf, md5($md5password_utf . $vbulletin->userinfo['salt']), '') ) { $return_value = false; ($hook = vBulletinHook::fetch_hook('login_verify_failure_password')) ? eval($hook) : false; if (isset($return_value)) { // unset $return_value if you want to run the $send_cookies stuff return $return_value; } } else if ($vbulletin->userinfo['password'] == '') { // sanity check, though there should never really be an empty string for a password $return_value = false; ($hook = vBulletinHook::fetch_hook('login_verify_failure_password')) ? eval($hook) : false; if (isset($return_value)) { // unset $return_value if you want to run the $send_cookies stuff return $return_value; } if ($send_cookies) { set_authentication_cookies($cookieuser); } $return_value = true; ($hook = vBulletinHook::fetch_hook('login_verify_success')) ? eval($hook) : false; return $return_value; } $return_value = false; ($hook = vBulletinHook::fetch_hook('login_verify_failure_username')) ? eval($hook) : false; return $return_value; } Code:
Parse error: syntax error, unexpected end of file in /home/swghopec/public_html/forums/includes/functions_login.php on line 612 Thank you, |
#2
|
|||
|
|||
I uploaded the full file.
|
#3
|
|||
|
|||
You're missing a closing bracket at line 265.
PHP Code:
PHP Code:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|