decline_email_invitation.php 556 B

12345678910111213141516171819202122232425
  1. <?php
  2. /**
  3. * Decline an email invitation
  4. */
  5. $invitecode = get_input("invitecode");
  6. if (!empty($invitecode)) {
  7. $options = array(
  8. "annotation_name" => "email_invitation",
  9. "annotation_value" => $invitecode,
  10. "limit" => false
  11. );
  12. if (elgg_delete_annotations($options)) {
  13. system_message(elgg_echo("groups:invitekilled"));
  14. } else {
  15. register_error(elgg_echo("group_tools:action:groups:decline_email_invitation:error:delete"));
  16. }
  17. } else {
  18. register_error(elgg_echo("group_tools:action:groups:email_invitation:error:input"));
  19. }
  20. forward(REFERER);