A

aboahmed

Basically I wanna link this code to xf_users but that php code uses password because it's meant for my_bb can someone help me to convert it or at least explain how i can do it? it won't work since there's no password in xf_users only username.

PHP:
<?php
$link = mysqli_connect("host", "username","pw");
$database = mysqli_select_db($link, "db_name");

$user = $_GET['username'];
$password = $_GET['password'];
$hwid = $_GET['hwid'];
$tables = "xf_users";

$sql = "SELECT * FROM ". $tables ." WHERE username = '". mysqli_real_escape_string($link,$user) ."'" ;
$result = $link->query($sql);
if ($result->num_rows > 0) {
    // Outputting the rows
    while($row = $result->fetch_assoc())
    {
        
        $password = $row['password'];
        $salt = $row['salt'];
        $plain_pass = $_GET['password'];
        $stored_pass = md5(md5($salt).md5($plain_pass));
        
        function Redirect($url, $permanent = false)
        {
            if (headers_sent() === false)
            {
                header('Location: ' . $url, true, ($permanent === true) ? 301 : 302);
            }
        exit();
        }
        
        if($stored_pass != $row['password'])
        {
            echo "p0<br>"; // Wrong pass, user exists
        }
        else
        {
            echo "p1<br>"; // Correct pass
        }
        
        echo "g" . $row['usergroup'] . "<br>";

        if (strlen($row['hwid']) > 1)
        {
            if ($hwid != $row['hwid'])
            {
                echo "h2"; // Wrong
            }
            else
            {
                echo "h1"; // Correct
            }
        }
        else
        {
            $sql = "UPDATE ". $tables ." SET hwid='$hwid' WHERE username='$user'";
            if(mysqli_query($link, $sql))
            {
                echo $row['hwid'];
                echo "h3"; // HWID Set
            }
            else
            {
                echo "h4"; // Else errors
            }
        }
    }
} 
?>

Would really appericate that
 

AnimeHaxor

Retro-NulledTeam
Registered
Joined
8 year 4 month 6 day
Messages
6,522
Reaction score
40,575
Points
113
Site Script
XenForo
That would be development. You can post on xF Official customer, only currently your own license if already bought.