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 ...


3

This SQL will clean up both exp_channel_titles and exp_channel_data: DELETE exp_channel_titles, exp_channel_data FROM exp_channel_titles INNER JOIN exp_channel_data ON exp_channel_data.entry_id = exp_channel_titles.entry_id WHERE exp_channel_titles.channel_id = 5 AND exp_channel_titles.status = 'your_custom_status' Replace the channel_id and status as ...


3

You can't delete those as open is a default status parameter for channel entries. What you can do is create your custom status, and only give your client access to the custom statuses. This way Open and Close never show up.


2

Using SQL to remove entries means you also have to do extra clean up on relationship tables and categories. You can bypass the input limits by appending the appropriate query string parameters to the address of the edit screen. For example, go to Publis > Edit > Your Channel. Then append the following to the url: &perpage=5&status=closed You ...


2

Well, I was also looking for an answer for this particular issue. I am still fine tuning what I have but the logic is updating the quantity of the item on the checkout template to zero then update the cart totals, that will remove an item from the cart. Code looks like: Checkout template: I added a link next to the quantity text field <td> <...


2

Just to expand on Justin's comment, I had this head scratcher too (assuming you've fallen into the same trap) and made a change request to Expresso. I had a single form with the quantity and remove buttons on. Users clicked remove, it submitted the form, but the Store code took priority of the quantity and therefore ignored the remove. I was using the ...


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

Sure - just make sure you return NULL or an empty array at the end of your method. (The hook expects an array of member_ids to be sent back.)


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