mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-14 15:00:16 +02:00
correct typo preventing disabling of discourse
This commit is contained in:
parent
666490c169
commit
f0a3df5659
@ -242,7 +242,7 @@ def validate_services(self, user, state):
|
|||||||
if auth.discourse_enabled and not getattr(settings, 'ENABLE_%s_DISCOURSE' % setting_string, False):
|
if auth.discourse_enabled and not getattr(settings, 'ENABLE_%s_DISCOURSE' % setting_string, False):
|
||||||
DiscourseManager.disable_user(user)
|
DiscourseManager.disable_user(user)
|
||||||
authinfo.discourse_enabled = False
|
authinfo.discourse_enabled = False
|
||||||
autninfo.save()
|
authinfo.save()
|
||||||
notify(user, 'Discourse Account Disabled', level='danger')
|
notify(user, 'Discourse Account Disabled', level='danger')
|
||||||
if auth.smf_username and not getattr(settings, 'ENABLE_%s_SMF' % setting_string, False):
|
if auth.smf_username and not getattr(settings, 'ENABLE_%s_SMF' % setting_string, False):
|
||||||
smfManager.disable_user(auth.smf_username)
|
smfManager.disable_user(auth.smf_username)
|
||||||
@ -473,5 +473,5 @@ def update_discourse_groups(self, pk):
|
|||||||
@task
|
@task
|
||||||
def update_all_discourse_groups():
|
def update_all_discourse_groups():
|
||||||
logger.debug("Updating ALL discourse groups")
|
logger.debug("Updating ALL discourse groups")
|
||||||
for user in AuthServicesInfo.objects.exclude(discourse_username__exact=''):
|
for user in AuthServicesInfo.objects.filter(discourse_enabled=True):
|
||||||
update_discourse_groups.delay(user.user_id)
|
update_discourse_groups.delay(user.pk)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user