Hot answers tagged

7

If you're comfortable with SQL, you can update the database to change the member_id on the comments to one that's not being deleted. So, you could create a 'past member' member, and then update the comments to use the member_id of the 'past member'. This will disconnect those comments from the members you want to delete. Other options: Save a backup of the ...


5

Yup, just load the Member model: ee()->load->model('member_model'); ee()->member_model->delete_member($member_id, $heir_id); $member_id can be a single member, or an array of ids. $heir_id is the member_id that should take authorship of any existing entries belonging to the member being deleted.


4

As Alex mentions, when a user has "Can delete members" rights, he/she can delete any member. A different approach would be to, not allow to delete members, but to only allow users to be moved to a member group with no (login) rights at all. You can restrict to which group a member can be assigned by setting the group to "locked". If needed, the restricted ...


2

If your preferred method to delete all the entries for a given channel is to just delete the channel, then you do not need to use the Channel API. You can just delete the channel in the control panel. Go to Admin > Channels and click "Delete" next to the channel you want to remove. If instead you prefer to do it using the API, then there is an error in your ...


1

You could just change their member information to whatever you wish. If one of the goals of deleting their account is to remove access to the EE CMS, changing them to a lower-level member could do it. Also, you could create a new member group and assign them to it -- something like "legacy authors" and then you can change the permissions for the group. The ...


1

I believe it only gives you the option to reassign if they actually have content. At least thats what I thought? Maybe it just looks at the users channel posting priviledges before offering the re-assign option... Has guest_user actually posted anything yet?? Another option is to create another member group based on "banned" or "guest" and instead of ...


1

I think there's already an option to reassign the entries created by that member to another member. It appears as a dropdown when you go through the deletion confirmation process.


1

I think GDmac's answer is the way to go. But I thought it would be fun to start on an extension.... This seems to do the trick, though it is pretty bare-bones (no settings, not much detail in the message shown to the user). Using the member_delete hook: public function member_delete($member_ids) { // Array of member group_ids for which to restrict ...


1

Yes - you can multi-select files in the Assets module control panel, then right-click and choose "Delete" from the custom contextual menu.


1

You right, the system is choose members from user group: "expressionengine/controllers/cp/members.php" line 677 (EE 2.7.2). $group_ids = $this->member_model->get_members_group_ids($damned); In case if you will delete multi users from multi groups, it will show you users from multi groups. Reason? As I think same group, same rights to do the same ...


1

This was a bug in Store 2.0.4 if you upgrade to Store 2.0.5 this should fix the problem for you.


1

I was working on a My Cart page last night and ran into the bug with the Remove From Cart functionality not working. I used jQuery to solve my problem. Here's my basic code. {exp:store:checkout next="checkout/step1"} {items} <input type="hidden" name="items[{key}][item_qty]" value="{item_qty}" class="remove-{key}"> <input id="...


1

This has been fixed in Store 2.0.5. If you are using an earlier version and can't upgrade right now, the problem is caused because Store was ignoring the remove_items array if no items array was submitted at all. To work around this, you should simply be able to add this line inside the {items} loop in your checkout tag. <input type="hidden" name="...


1

To delete all channel items but keep the channel itself (e.g. channel id may be hardcoded in some custom code or whatever), do from the admin panel: The usual way is to select items page by page, click "delete", repeat for all pages. Works, but quite tedious especially for a lot of items. To make it less tedious, in the chrome inspector tool, replace the ...


Only top voted, non community-wiki answers of a minimum length are eligible