Developer forum

Forum » Integration » User Provider and Smartseaches

User Provider and Smartseaches

Michael Knudsen
Reply

How can we deactivate missing users in a integration with the User Provider?  It was working, until the first user group based on a smartsearch was added.

User Provider setup:

 

 

One of the customers which no longer are available in the XML, have the following groups (ALL customers = smartsearch group, Customers = user group, New Users = segment):

Br. Michael Knudsen


Replies

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Michael,

this is because now the user has 3 groups assigned and that is why it is not deactivated because of that.

You can remove the "Customers"/clear the "Destination group" setting - then all missing users will be deactivated.

If that is not an option then you can check the checkbox "Remove users group membership, if group is not in import" and have a column mapping for the AccessUserGroups column (it can be just one "Customers" group/Scripting->Constant value - then all other user-group relations will be lost, or adjust source data with the relevant comma-separated groups ids/or AcceessUserUserName's  values for this column to keep the relations).

If that solution doesn't suit then you need to look on writting a custom table script for that purpose, so it can find the existing user and take its existing groups to fill the AccessUserGroups source row value, you can find a sample script is in this thread.

BR, Dmitrij

 
Michael Knudsen
Reply

Hello Dmitrij,

- and thanks for your suggestions, seems we have to build something custom for this.

Do you know why "Deactivate missing users" isn't implemented the same way as "Deactivate missing products" ?  Products can exists in many groups, but will be deactivated anyway, if its missing.

Br. Michael Knudsen

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply
This post has been marked as an answer

Hi Michael,
Once the "Destination group" setting is empty/not set - then all missing users will be deactivated, so it will work in the same way as for the products.
BR, Dmitrij

Votes for this answer: 1

 

You must be logged in to post in the forum