only sync active and sync enabled groups

This commit is contained in:
Jonathan Jenne 2019-04-23 14:44:09 +02:00
parent b5559955a3
commit 3bd9c04b9c

View File

@ -102,7 +102,7 @@ Namespace SyncUsers
Private Function GetGroupId(GroupName As String) As Integer Implements ISyncUsers.GetGroupId
Try
Dim oSQL As String = $"SELECT GUID FROM TBDD_GROUPS WHERE NAME = '{GroupName}'"
Dim oSQL As String = $"SELECT GUID FROM TBDD_GROUPS WHERE NAME = '{GroupName}' AND AD_SYNC = 1 AND ACTIVE = 1"
Dim oGroupId = _mssql.NewExecuteScalar(oSQL)
If IsDBNull(oGroupId) OrElse oGroupId = 0 Then