Forums | Mahara Community

Support /
Permanently delete user


Mike Korn's profile picture
Posts: 51

17 November 2010, 17:27

Hi All,

Can anyone tell me how to permanently delete a user through MySQL without any errors?

Using Mahara 13.1, Ubuntu 64 Bit Server, MySql

Thanks

Craig Eves's profile picture
Posts: 104

18 November 2010, 16:06

Hi Mike

You can delete a user from the site administration menu under Manage users > Delete user

Is this not possible for this particular user - is there a problem with the user record preventing this being done

I am not sure how this would be done in MySQL but you would need to delete all the related records in all other tables using a cascade delete function - this may be a feature in an database admin program like mySQL admin.

regards

Craig

Mike Korn's profile picture
Posts: 51

18 November 2010, 18:22

Thanks Craig,

Deleting a user through the admin menu doesn't delete the record from the database. The user still exists and is compounding some other problems. Not sure why it does that. 

Thanks again,

Mike

Kristina Hoeppner's profile picture
Posts: 4729

21 November 2010, 0:03

Hi Mike,

I would say the user is not deleted entirely from the database because he may have participated in forum discussions etc. where his presence is still required, i.e. you can't just delete all his forum posts. Moodle works the same way if I am not mistaken.

I know this doesn't really help with your problem, it's just an attempt at an explanation.

Cheers

Kristina

Saskia Sowa's profile picture
Posts: 7

26 April 2017, 6:13

Since this is an old posting from 2010 I would like to ask the same question again: is it still not possible to delete ALL user information? My question aims especially at data that was uploaded in a group. Thanks!

Robert Lyon's profile picture
Posts: 757

26 April 2017, 8:16

Hi Saskia,

Currently the delete_user($userid) function only deletes relevant information but still leaves the forum post info and an 'in delete state' user account in the usr table.

It should be easy enough to add a flag to the delete_user() function, say $purge, that when set to true deletes all trace of the user including forum postings, usr table data, dataroot entries etc.

I'll make a bug report for it in case anyone wants to make the change or add more information to what needs to be done

https://bugs.launchpad.net/mahara/+bug/1686193

Cheers

Robert

6 results