Finish Attribute syncing

This commit is contained in:
Jonathan Jenne
2019-04-30 17:26:07 +02:00
parent 7d1c2ced5a
commit 9e330bd52e
2 changed files with 38 additions and 13 deletions

View File

@@ -155,6 +155,8 @@ Namespace SyncUsers
Public Sub AddCustomAttributesToUser(User As ADUser, UserId As Integer) Implements ISyncUsers.AddCustomAttributesToUser
Dim oCustomAttributes = User.CustomAttributes
_logger.Debug("Adding {0} Custom Attributes to User {1}", oCustomAttributes.Count, User)
For Each oAttribute In oCustomAttributes
Dim oSQL As String = $"UPDATE TBDD_USER SET {oAttribute.MSSQLColumn} = '{oAttribute.Value}', CHANGED_WHO = '{ADDED_WHO}' WHERE GUID = {UserId}"
Dim oResult = _mssql.NewExecutenonQuery(oSQL)