Developer forum

Forum » Development » Get Users from API

Get Users from API

Anders Ebdrup
Anders Ebdrup
Reply

Dear Dynamicweb,

 

What is best practise for getting specific users from the api when the methods GetUsersBySql and and GetUsers(CommandBuilder) are obsolete?

 

Best regards,

Anders


Replies

 
Kevin Steffer
Kevin Steffer
Reply

Hi Anders, 

We typically use the methods on this Dynamicweb.Security.UserManagement.User class.

 
Anders Ebdrup
Anders Ebdrup
Reply

Dear Kevin,

 

Thanks for quick answer here. The case is that we need users with a certain customnumber and a specific value in a custom field on the user.

And I cannot see how this is done by the current api?

 

Best regards,

Anders

 
Nicolai Pedersen
Reply

You cannot - only by using the obsolete API - it will stick around until DW10 though...

 
Kevin Steffer
Kevin Steffer
Reply
This post has been marked as an answer

For such scenarios we've used a User Repository with index, queries etc. if you don't need the user object themselves.

Votes for this answer: 1

 

You must be logged in to post in the forum