PS: This i an old version - 4.0.2.1 and upgrading is not an option right now since there is too much custom coding involved. So I cannot use any of the great packages there is to achieve this, plus its a MySql installation to complicate it even more..
One "hack" I can use is to build a simple usercontrol that loads an xml list with all member ids that i filtered by member group and just delete them from CmsMember.
If you have all the member ids, I would use the API to delete them to avoid any chance of messing the DB up - it might just be me being a chicken, but that's what I would do.
I'm "stuck" on a later version, but I don't think the API has changed much in this area:
umbraco.cms.businesslogic.member.Member mbr = new umbraco.cms.businesslogic.member.Member(id); mbr.delete();
Delete members by membergroup
Hi!
I want to delete all members within a certain member group.
Is there an easy way to achieve this?
PS: This i an old version - 4.0.2.1 and upgrading is not an option right now since there is too much custom coding involved. So I cannot use any of the great packages there is to achieve this, plus its a MySql installation to complicate it even more..
One "hack" I can use is to build a simple usercontrol that loads an xml list with all member ids that i filtered by member group and just delete them from CmsMember.
Is that ok or will it mess upp the system?
If you have all the member ids, I would use the API to delete them to avoid any chance of messing the DB up - it might just be me being a chicken, but that's what I would do.
I'm "stuck" on a later version, but I don't think the API has changed much in this area:
umbraco.cms.businesslogic.member.Member mbr = new umbraco.cms.businesslogic.member.Member(id);
mbr.delete();
regards, Steen
The problem is that there is over 2500 members that should be deleted and I wonder if umbraco.cms.businesslogic.member is too slow to handle that?
I know that working with that often chokes the connection to the db.
I created a usercontrol and used the API code and it worked!
Except one strange thing: The member is still in the DB but not in the backend?
Is the member inactivated or something or am I just crazy??
:) Is that a question for me?
Not really sure, I'm not totally sure as to how it is done, but maybe the transaction is not done clearing the data out of the tables?
I feel like going crazy when it doesnt make any sense :)
Well, the mist important thing is that it looks ok in the backend..but still strange..
Thx for the help!
np, and the members are still in the database?
I think I found the problem...
The row with the user in UmbracoNode is deleted but not the other connected rows.
Very strange..and I know that the loop of deleteing finished.
Is that the way the api around member.delete() should work?
is working on a reply...