<?php
// Locate config.php and set the basedir path
$folder_level = ""; $i = 0;
while (!file_exists($folder_level."config.php")) {
$folder_level .= "../"; $i++;
if ($i == 5) { die("Config file not found"); }
}
require_once $folder_level."config.php";
define("BASEDIR", $folder_level);
function dbconnect($db_host, $db_user, $db_pass, $db_name) {
$db_connect = @mysql_connect($db_host, $db_user, $db_pass);
$db_select = @mysql_select_db($db_name);
if (!$db_connect) {
die("<div style='font-family:Verdana;font-size:11px;text-align:center;'><b>Unable to establish connection to MySQL</b><br />".mysql_errno()." : ".mysql_error()."</div>");
} elseif (!$db_select) {
die("<div style='font-family:Verdana;font-size:11px;text-align:center;'><b>Unable to select MySQL database</b><br />".mysql_errno()." : ".mysql_error()."</div>");
}
}
// Establish mySQL database connection
$link = dbconnect($db_host, $db_user, $db_pass, $db_name);
//////////////////////////////////////
$db_request = 'SELECT * FROM fusion_users ORDER BY user_id';
$exec = mysql_query($db_request);
while ($line = mysql_fetch_array($exec)) {
extract($line);
$result = md5($line['user_password']);
mysql_query("UPDATE fusion_users SET user_password='".$result."' WHERE user_id = ".$line['user_id']);
echo "id ".$line['user_id']." done sucessfully<br />";
}
?>
user_salt
varchar(40) NOT NULL DEFAULT '',[/syntaxhighlighter]fusion_users
SET user_salt
='<XYZ_salt>',user_password
='<XYZ_password>' WHERE user_id
!=1;[/olist]Category Forum
Upgrading issues - 8Labels
None yet
Statistics
8 participants
Notifications
You are not receiving notifications from this thread.
Related Questions