Add Discourse users to Protospace Members group on auth
This commit is contained in:
parent
3a91f14b29
commit
0b25fa173b
|
@ -744,6 +744,9 @@ class SpaceportAuthSerializer(LoginSerializer):
|
||||||
data['username'] = user.member.discourse_username or user.username
|
data['username'] = user.member.discourse_username or user.username
|
||||||
utils_auth.set_discourse_password(data)
|
utils_auth.set_discourse_password(data)
|
||||||
|
|
||||||
|
if not user.member.paused_date:
|
||||||
|
utils_auth.add_discourse_group_members('protospace_members', [data['username']])
|
||||||
|
|
||||||
if not user.member.discourse_username:
|
if not user.member.discourse_username:
|
||||||
user.member.discourse_username = user.username
|
user.member.discourse_username = user.username
|
||||||
user.member.save()
|
user.member.save()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user