Esempio n. 1
0
 /**
  * Active ou désactive un administrateur de famille
  *
  * Beware of bugs in the above code; I have only proved it correct, not tried it.
  */
 function setFamilyAdminActivation()
 {
     if (isset($_POST["adminId"])) {
         if (Users::isUserActivated($_POST["adminId"]) && Users::isUserFamilyOwner($_POST["adminId"])) {
             Users::deactivateUser($_POST["adminId"]);
         } else {
             Users::activateUser($_POST["adminId"]);
         }
     }
 }