Trying to utilize a virtual attribute of type DN and pump the values of a users "memberof" attribute into it at the time the virtual attribute is accessed. However, continuing to receive the following error: The attribute cannot be modified because it is owned by the system. Any thoughts?
Sub onPreGet(Request)
Const ADS_PROPERTY_UPDATE = 2
Const EDS_PROPERTY_APPEND = 3
groupAttribute = "edsvaMemberOfReplica"
If Request.Class <> "user" Then Exit Sub
If Not Request.IsAttributeRequested(groupAttribute) Then Exit Sub
Set user = GetObject(Request.ADsPath)
memberOf = user.GetEx("memberOf")
user.GetInfoEx Array(groupAttribute,"isSingleValued"),0
user.PutEx ADS_PROPERTY_UPDATE, groupAttribute, memberOf
user.Put "isSingleValued",False
user.SetInfo
Set user = Nothing
End Sub