Developer forum

Forum » CMS - Standard features » Remove user group

Remove user group

Manon Wekking
Reply

Hi, 

We delated different user groups under user management. The strange thing is that in first case it is possible to remove them, but the next day the user groups are back. 

Is there a proces in DW that makes them coming back again?

Kind gerards, 

Manon Wekking


Replies

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Manon,
you could check if you don't have any active scheduled tasks or scheduled data integration jobs that could import the users/users groups regularly.
Settings -> System -> Scheduled tasks and Settings -> Integration -> Data integration (check scheduled jobs)
Regards, Dmitrij

 
Manon Wekking
Reply

Hi Dmitriy, 

We did a lot of research, but it is not an integration job and also not a smart search that makes it possible that the group and the users are coming back. The developer also did research and we are out of options where this is coming from. Can you please take a look and see what is wrong? https://www.kwpn.nl/admin/ 

The groups that we want to delete are:

- Eenmalige mailing

- IDS int uit Equis

- IDSI4 2017

Hope to hear from you. 

BR, 

Manon Wekking

 

 

 

Deleting_user_groups.png
 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Mannon,
you could check your custom modules if they are not doing smth with that. Also when you are deleting the user group you could check the "AccessUser" table in the ManagementCenter->Database->Sql firehouse for your group being deleted or not.
Regards, Dmitrij

 
Manon Wekking
Reply

Hi Dmitriy, 

There are no custom modules which influence users and user groups. I can delete these groups at the users in the databese, so there are no users anymore in the group, but then I think the group itself will still exist. And there is a chanche that the group will be filled with these users the next day. 

Do you have a more safer solution?

BR, 

Manon 

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Mannon,
I mean that you can execute the sql to check if the group exists before its deletetion and check it doesn't exist after the deletion. For example for "IDSI4 2017" group which id is 112919:
1. Execute the sql and ensure you see the returned row: select * from accessuser where accessuserid = 112919
2. Delete the group in User management backend
3. Execute the sql again and check the row no more exists.
By the way are you sure your database is only attached to this website? Maybe it is used somewhere else or gets restored automatically from time to time?
Regards, Dmitrij

 
Manon Wekking
Reply

Hi, 

It looks like that when a user doesn't have a user name and password, because it is imported for the newsletter, that then you can't remove it from the group. 

When you do right click on the user and choose remove from group, that it keeps on turning with no result. 

Is this a known problem? Or is there another way to do this?

BR, 

Manon

 
Manon Eppink
Reply

Hi, 

We still have this problem with deleting users from a group that have nog username and password. Is there anything we can do about this? 

Note: it is a 8.9.2.16 version.

BR, 

Manon

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Mannon,
there is a problem in 8.9 that you can not save/update the user without username. So you could use some extensibility api and subscribe to:
Notifications.GroupOnBeforeSave event
and use that piece of code that will update the detaching users usernames to "somestring" value before that will be detached from group:
If Request("cmd")  =  "Detach"  Then
Dim userIDs As New IDCollection()
userIDs.LoadFromString(Base.ChkString(Request("UserID")))
For Each u As Dynamicweb.Modules.UserManagement.User In Dynamicweb.Modules.UserManagement.User.GetUsersByID(userIDs)
                    If String.IsNullOrEmpty(u.UserName) Then
                        u.UserName = 'somestring'
                        u.Save()
                    End If
                Next
End If
Regards, Dmitrij

 

You must be logged in to post in the forum