Add new users to protospace_members Discourse group

This commit is contained in:
Tanner Collin 2021-09-25 23:00:16 +00:00
parent 6cc2b44711
commit 3dd606b0af

View File

@ -415,6 +415,13 @@ def register_user(data, user):
utils.alert_tanner(msg)
logger.info(msg)
if utils_auth.discourse_is_configured():
if data['request_id']: utils_stats.set_progress(data['request_id'], 'Adding to Discourse group...')
if utils_auth.add_discourse_group_members('protospace_members', [data['username']]) != 200:
msg = 'Problem connecting to Discourse Auth server: add.'
utils.alert_tanner(msg)
logger.info(msg)
if data['request_id']: utils_stats.set_progress(data['request_id'], 'Done!')
time.sleep(1)