Browse Source

Award invite badge when a user registers

spaghetti 9 years ago
parent
commit
a687602ded
1 changed files with 6 additions and 0 deletions
  1. 6
    0
      sections/register/index.php

+ 6
- 0
sections/register/index.php View File

@@ -124,6 +124,12 @@ if (!empty($_REQUEST['confirm'])) {
124 124
 				DELETE FROM invites
125 125
 				WHERE InviteKey = '".db_string($_REQUEST['invite'])."'");
126 126
 
127
+			// Award invite badge to inviter if they don't have it
128
+			if (Badges::award_badge($InviterID, 136)) {
129
+				Misc::send_pm($InviterID, 0, 'You have received a badge!', "You have received a badge for inviting a user to the site.\n\nIt can be enabled from your user settings.");
130
+				$Cache->delete_value('user_badges_'.$InviterID);
131
+			}
132
+
127 133
 			$DB->query("
128 134
 				SELECT ID
129 135
 				FROM stylesheets

Loading…
Cancel
Save