Example #1
0
 /**
  * Save the users into the file
  * @return bool
  */
 public static function save()
 {
     file_put_contents(Config::getDataFolder() . "users.json", json_encode(self::$users, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES));
     if (!Utils::getJsonErrors()) {
         Config::getLogger()->info("Users saved !");
     } else {
         Config::getLogger()->error("An error occured while saving users !");
     }
     return Utils::getJsonErrors();
 }