Skip to content

Commit 26c8b51

Browse files
committed
Add inviteUser
1 parent 0f489f0 commit 26c8b51

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lib/DiscourseAPI.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,5 +290,14 @@ function createPost($bodyText, $topicId, $categoryId, $userName)
290290
return $this->_postRequest('/posts', $params, $userName);
291291
}
292292

293+
function inviteUser($email, $topicId, $userName = 'system')
294+
{
295+
$params = array(
296+
'email' => $email,
297+
'topic_id' => $topicId
298+
);
299+
return $this->_postRequest('/t/'.intval($topicId).'/invite.json', $params, $userName);
300+
}
301+
293302
}
294303

0 commit comments

Comments
 (0)