prueba esto
Código PHP:
Ver original$sql1 = "SELECT * FROM REGISTER_USERS WHERE USERNAME='$username'";
$sql = "SELECT * FROM REGISTER_USERS r INNER JOIN AVATARS a ON r.IUID = a.IUID WHERE r.IUID = '".$fila1['IUID']."'";
$_SESSION['login'] = true;
$_SESSION['avatar'] = $fila['IMAGE'];
$_SESSION['username'] = $fila['USERNAME'];
$_SESSION['upload'] = $fila['UPLOADS'];
}