activate.php 414 B

123456789101112131415161718
  1. <?php
  2. namespace AU\AnonymousComments;
  3. $version = elgg_get_plugin_setting('version', PLUGIN_ID);
  4. if (!$version) {
  5. elgg_set_plugin_setting('version', PLUGIN_VERSION, PLUGIN_ID);
  6. }
  7. $add_to_river = elgg_get_plugin_setting('add_to_river', PLUGIN_ID);
  8. if (!$add_to_river) {
  9. elgg_set_plugin_setting('add_to_river', 'no', PLUGIN_ID);
  10. }
  11. //generate our fake user if it's not already existing
  12. $user = get_anon_user();