Developer forum

Forum » Development » Problems with UserManagement API

Problems with UserManagement API

Martin Nielsen
Reply

Hi DW,

 

I have a solution that has about 1800 groups under one group in UserManagement.

Each group represents a company, and under each group i have X employess.

 

In my code a have a method that adds a user to a company, but it's pretty slow, he's a snipper from my code:

Dynamicweb.Modules.UserManagement.User user = Dynamicweb.Modules.UserManagement.User.GetUserByID( intUserID );
user.Name = "John Doe";
user.AddToGroup( companyID );
user.Save();

The code above takes about 30-50 seconds to run.

 

Where as this call is almost instant:

Dynamicweb.Modules.UserManagement.User user = Dynamicweb.Modules.UserManagement.User.GetUserByID( intUserID );
user.Name = "John Doe";
user.Save();

It seems that when i use AddToGroup() there's some logic that takes a lot of time to run.

 

Do you have any ideas for a workaround? I'm running 8.2.1.11.

 

// Martin


Replies

 
Morten Snedker
Reply

Hi Martin,

 

Is possible for you to move the solution to 8.3.1, at least for test? There has been made huge performance improvements, from where your solution is at, and up to 8.3.1.

 

Best regards

/Snedker

 

 

 

 

 

 

 

You must be logged in to post in the forum