mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2026-02-09 00:26:20 +01:00
Include state in service group sync.
The "empty" group will never appear as all users have a state so it has been removed. I haven't yet found a good way to apply this to Teamspeak - perhaps go back to the token generation logic and create one with a user's state instead of "Member" and exempt those names from group sync? Addresses #950
This commit is contained in:
@@ -40,11 +40,9 @@ class Phpbb3Tasks:
|
||||
user = User.objects.get(pk=pk)
|
||||
logger.debug("Updating phpbb3 groups for user %s" % user)
|
||||
if Phpbb3Tasks.has_account(user):
|
||||
groups = []
|
||||
groups = [user.profile.state.name]
|
||||
for group in user.groups.all():
|
||||
groups.append(str(group.name))
|
||||
if len(groups) == 0:
|
||||
groups.append('empty')
|
||||
logger.debug("Updating user %s phpbb3 groups to %s" % (user, groups))
|
||||
try:
|
||||
Phpbb3Manager.update_groups(user.phpbb3.username, groups)
|
||||
|
||||
Reference in New Issue
Block a user