From 0f9a3e8cb6876b7300a4325c1cd0dcf81a69c832 Mon Sep 17 00:00:00 2001 From: Sarjuuk Date: Sun, 5 Apr 2020 12:31:59 +0200 Subject: [PATCH] Profiler/Custom * fixed deleted profiles counting towards the user cap of 10 --- includes/ajaxHandler/profile.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/ajaxHandler/profile.class.php b/includes/ajaxHandler/profile.class.php index ef01b2b5..8369b763 100644 --- a/includes/ajaxHandler/profile.class.php +++ b/includes/ajaxHandler/profile.class.php @@ -371,7 +371,7 @@ class AjaxProfile extends AjaxHandler } else // new { - $nProfiles = DB::Aowow()->selectCell('SELECT COUNT(*) FROM ?_profiler_profiles WHERE user = ?d AND realmGUID IS NULL', User::$id); + $nProfiles = DB::Aowow()->selectCell('SELECT COUNT(*) FROM ?_profiler_profiles WHERE user = ?d AND (cuFlags & ?d) = 0 AND realmGUID IS NULL', User::$id, PROFILER_CU_DELETED); if ($nProfiles < 10 || User::isPremium()) if ($newId = DB::Aowow()->query('INSERT INTO ?_profiler_profiles (?#) VALUES (?a)', array_keys($cuProfile), array_values($cuProfile))) $charId = $newId;