Merhaba,
Öncelikle $_POST['guard'] olarak aldığınız verinin inputta ki isimlerini öğrenebilir miyim? Yani inputlarınızın name ve value değerlerini yazar mısınız?
<div class="col-md-4 col-lg-4">
<div class="custom-control custom-switch switch-success">
<input type="checkbox" class="custom-control-input" name="guard[]" id="kullanıcı" value="sUsers">
<label class="custom-control-label" for="kullanıcı">Kullanıcı Yönetimi</label>
</div>
<div class="custom-control custom-switch switch-success">
<input type="checkbox" class="custom-control-input" name="guard[]" id="parakende" value="sRetailPrice">
<label class="custom-control-label" for="parakende">Perakende Fiyat Görünsün</label>
</div>
<div class="custom-control custom-switch switch-success">
<input type="checkbox" class="custom-control-input" name="guard[]" id="sifre" value="sPassword">
<label class="custom-control-label" for="sifre">Şifre İşlemleri</label>
</div>
<div class="custom-control custom-switch switch-success">
<input type="checkbox" class="custom-control-input" name="guard[]" id="kampanyalar" value="sCampaigns">
<label class="custom-control-label" for="kampanyalar">Kampanyalar</label>
</div>
</div>belirli bir kısmını atayım buyrun.