Trying to upgrade....

Forum
Last Post
Threads / Messages

SilverDragonTears

I am your Nemesis.
Premium Member
Joined
Jun 1, 2011
Messages
1,113
Points
36
Mysidian Dollar
51,802
without losing all my modifications and when I try to encrypt passwords it says I have to upgrade to 1.2.3 Why can't I just do it manually? This is really frustrating.
 
Lol this. It was set this way to prevent admins from running password encryption multiple times, as they may end up running userencrypt.php twice to mess things up. I will show u a solution to ur problem later.
 
Well your userencrypt.php file should looks like this below:

PHP:
<?php

include("inc/functions.php");

//***************//
//  START SCRIPT //
//***************//

$article_title = "User Password Encryption Wizard"; 
$article_content = "You are trying to encrypt every user's password, this may take a few secs or mins depending on the size of your memberbase. </br></br>";
$vers = grabanysetting("version");

if($vers == "1.2.3"){

$query = "SELECT * FROM {$prefix}users";
$result = runquery($query);

while($user = mysql_fetch_array($result)){
$newpass = updatepass($user['username'], $user['password']);

$query = "UPDATE {$prefix}users SET password='{$newpass}' WHERE username='{$user['username']}'";
runquery($query);

$article_content .= "Updating user {$user['username']}, action complete.</br>";

}



$article_content .= "</br>You have successfully encrypted your password! You can now log into your account and build an awesome adoptables site of yours!</br>
<br><b>We strongly recommend you to remove usercrypt.php now, together with the entire /install folder before managing your site.</b>";

$query = "DELETE FROM {$prefix}settings WHERE name='version'";
runquery($query);

}
else{
  $article_content .= "You are still using an old version of Mysidia Adoptables, please upgrade before running user password encryption wizard.";
}

//***************//
//  OUTPUT PAGE  //
//***************//

echo showpage($article_title, $article_content, $date);

?>
Replace with:
PHP:
<?php

include("inc/functions.php");

//***************//
//  START SCRIPT //
//***************//

$article_title = "User Password Encryption Wizard"; 
$article_content = "You are trying to encrypt every user's password, this may take a few secs or mins depending on the size of your memberbase. </br></br>";

$query = "SELECT * FROM {$prefix}users";
$result = runquery($query);

while($user = mysql_fetch_array($result)){
$newpass = updatepass($user['username'], $user['password']);

$query = "UPDATE {$prefix}users SET password='{$newpass}' WHERE username='{$user['username']}'";
runquery($query);

$article_content .= "Updating user {$user['username']}, action complete.</br>";

}



$article_content .= "</br>You have successfully encrypted your password! You can now log into your account and build an awesome adoptables site of yours!</br>
<br><b>We strongly recommend you to remove usercrypt.php now, together with the entire /install folder before managing your site.</b>";

$query = "DELETE FROM {$prefix}settings WHERE name='version'";
runquery($query);

//***************//
//  OUTPUT PAGE  //
//***************//

echo showpage($article_title, $article_content, $date);

?>
Make sure you back up your table prefix.users before running the new script, since you will mess up the password encryption if you by any chance executes the script twice or more. Sometimes you may not even realize that you've done this, it happens to me too with slower internet.
 
I got this
Fatal error: Call to undefined function updatepass() in /home/robynswo/public_html/userencrypt.php on line 16
 

Similar threads

Users who are viewing this thread

  • Forum Contains New Posts
  • Forum Contains No New Posts

Forum statistics

Threads
4,280
Messages
33,132
Members
1,603
Latest member
Monako
BETA

Latest Threads

Top