Daegaladh
Member
I've noticed that when you delete a user, some banner files still remain, that's because the if-elseif structure, since the user can upload a new banner with a different extension, those files are never deleted. Also premium banners are never deleted either.
That's why I propose this fix:
in sources/admin/delete.php
Replace:
With:
That's why I propose this fix:
in sources/admin/delete.php
Replace:
PHP:
if(file_exists("banners/{$username}.jpg"))
{
unlink("banners/{$username}.jpg");
}
else if(file_exists("banners/{$username}.jpeg"))
{
unlink("banners/{$username}.jpeg");
}
else if(file_exists("banners/{$username}.png"))
{
unlink("banners/{$username}.png");
}
else if(file_exists("banners/{$username}.gif"))
{
unlink("banners/{$username}.gif");
PHP:
foreach (glob("banners/{$username}.{jpg,jpeg,png,gif}", GLOB_BRACE) as $banner)
unlink($banner);
foreach (glob("banners/premium_{$username}.{jpg,jpeg,png,gif}", GLOB_BRACE) as $premium_banner)
unlink($premium_banner);
Last edited: