we may used the If Statement millions times , but do you really trust this single line in expansive code ? . let's say you have a buy button or download button in your website that will give the user a expensive product and to get this product you need to be a VIP user . so do you just use
if($user->IsVip){
//give him 1 million dollar product
}
the value IsVip
is just boolean can be 0
or 1
so what if the database get corrupted or hacked or any other issue that cause returning incorrect value from tha reality do you Trust it ? or you use your own class or function to determine the results ? i know some companies that uses the history of user and check it manually by agents so what do you think ? thanks
Aucun commentaire:
Enregistrer un commentaire