Skip to content

Commit

Permalink
Merge pull request #1105 from c2corg/link-forum-topoguide
Browse files Browse the repository at this point in the history
Whnc sync SSO, set the custom field topo_id
  • Loading branch information
cbeauchesne authored Jun 14, 2021
2 parents 3a69c25 + c746835 commit aec1ab5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion c2corg_api/security/discourse_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ def sync_sso(self, user):
name=user.name,
username=user.forum_username,
email=user.email,
external_id=user.id)
external_id=user.id,
**{"custom.user_field_1": str(user.id)})
if result:
self.discourse_userid_cache[user.id] = result['id']
return result
Expand Down
3 changes: 2 additions & 1 deletion c2corg_api/tests/views/test_sso.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ def test_new_user_success(self, discourse_mock):
name='New User',
username='NewUser',
email='[email protected]',
external_id=sso_user.id
external_id=sso_user.id,
**{"custom.user_field_1": str(sso_user.id)}
)

def token_from_url(self, url):
Expand Down

0 comments on commit aec1ab5

Please sign in to comment.