I am member in some clubs. Yes. But I don't have 12.
I only owned the "Hellfire" club. It was a private club but since I don't have the time to take care for it I closed it some time ago. But as you obviously saw by yourself it is still in my list of clubs.
I didn't give you the exact ID because the link to the club on my profile page is "https://www.imagefap.com/clubs/index.php?cid=" It simply has no club ID there.
But as I just noticed the club ist still there in myFap:
https://www.imagefap.com/clubs/index.php?cid=16845 I am really sure that I closed it. Just tried it now again by myself.
Done. Seems to have worked now. I am still a member now. But it says "closed by owner"
Two other clubs also do no longer show up with their ID on my profile.
https://www.imagefap.com/clubs/index.php?cid=10869 (closed by IF)
https://www.imagefap.com/clubs/index.php?cid=18701 (obviously still open but manager's account is closed)
So it seems to show me my memberships properly on the profile page but without the cid if the club is either closed or clearly not managed.
I also saw that you closed the misssing avatar thread. And that you have to refresh your IT skills. I just made some thoughts about the problem.
1.) Check if there is a avatar image (profile or club seems to be the same problem) in the database
2.) Check if the avatar image is on the server.
3.) If the image is not on the server, replace the file name in the database by the standard avatar name.
In php this could look like that:
- Code: Select all
<?php
// ==========================================
// CONFIGURATION
// ==========================================
$host = 'localhost';
$db = 'your_database';
$user = 'your_username';
$password = 'your_password';
$charset = 'utf8mb4';
// SAFETY FIRST: Set to TRUE to actually update the database.
// Set to FALSE to only preview what would be changed.
define('DRY_RUN', true);
$table = 'users';
$idColumn = 'id';
$smallColumn = 'avatar_small'; // Name of small avatar column
$largeColumn = 'avatar_large'; // Name of large avatar column
$pathColumn = 'avatar_dir'; // The column containing the directory path (e.g., "uploads/avatars/01/")
// The fallback value to insert if a file is missing.
// Best practice: Use a global path or a specific placeholder string.
$defaultSmall = 'default_small.png';
$defaultLarge = 'default_large.png';
// Absolute base path of your web space where the avatar directories live
$serverRoot = '/var/www/html/';
// ==========================================
// DATABASE CONNECTION & EXECUTION
// ==========================================
$dsn = "mysql:host=$host;dbname=$db;charset=$charset";
try {
$pdo = new PDO($dsn, $user, $password, [
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
]);
} catch (PDOException $e) {
die("Database connection failed: " . $e->getMessage());
}
if (DRY_RUN) {
echo "<h1>⚠️ RUNNING IN LIVE MODE - CHANGES WILL BE WRITTEN TO DB ⚠️</h1>";
} else {
echo "<h1>ℹ️ RUNNING IN SIMULATION MODE - NO CHANGES WILL BE MADE ℹ️</h1>";
}
// Select users who have at least one avatar specified
$sqlSelect = "SELECT $idColumn, $smallColumn, $largeColumn, $pathColumn
FROM $table
WHERE ($smallColumn IS NOT NULL AND $smallColumn != '')
OR ($largeColumn IS NOT NULL AND $largeColumn != '')";
$stmtSelect = $pdo->query($sqlSelect);
// Prepare separate updates for small and large to handle partial losses safely
$sqlUpdateSmall = $pdo->prepare("UPDATE $table SET $smallColumn = :default WHERE $idColumn = :id");
$sqlUpdateLarge = $pdo->prepare("UPDATE $table SET $largeColumn = :default WHERE $idColumn = :id");
while ($row = $stmtSelect->fetch()) {
$id = $row[$idColumn];
$dir = rtrim($row[$pathColumn], '/') . '/'; // Ensure clean trailing slash
// 1. Check Small Avatar
if (!empty($row[$smallColumn]) && $row[$smallColumn] !== $defaultSmall) {
$fullPathSmall = $serverRoot . $dir . $row[$smallColumn];
if (!file_exists($fullPathSmall)) {
if (!DRY_RUN) {
echo "[SIMULATION] User ID $id: Small avatar missing. Would reset to default.<br>";
} else {
$sqlUpdateSmall->execute([':default' => $defaultSmall, ':id' => $id]);
echo "User ID $id: Small avatar updated to default.<br>";
}
}
}
// 2. Check Large Avatar
if (!empty($row[$largeColumn]) && $row[$largeColumn] !== $defaultLarge) {
$fullPathLarge = $serverRoot . $dir . $row[$largeColumn];
if (!file_exists($fullPathLarge)) {
if (!DRY_RUN) {
echo "[SIMULATION] User ID $id: Large avatar missing. Would reset to default.<br>";
} else {
$sqlUpdateLarge->execute([':default' => $defaultLarge, ':id' => $id]);
echo "User ID $id: Large avatar updated to default.<br>";
}
}
}
}
echo "<h2>Process finished.</h2>";
?>
Will run quite a while I guess but if you work with a copy of the table (of course you do that with a backup copy) nobody will realise that you are digging around in the database.
I regarded the fact that there are small and big avatar images where either one or both can be missing and that they are shattered over more than one directory. And I implemented a test run because the live version will directly change the database.
It's just a first try because I neither know the exact structure of your database nor do I know if you have direct access to the database or if you are working via control panel (I don't hope so).
To find those with only the small avatar lost just perform a SQL query where small avatar is standard and the big one not. And vice versa if you want to replace the big standard avatar image by the thumbnail.
Perhaps it will help you.