Comment 1 for bug 916998

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/993
Committed: http://gitorious.org/mahara/mahara/commit/9bc9d15c2780e7b12f49595a482d65ed8cd76e53
Submitter: Francois Marier (<email address hidden>)
Branch: master

commit 9bc9d15c2780e7b12f49595a482d65ed8cd76e53
Author: Richard Mansfield <email address hidden>
Date: Mon Jan 16 14:12:07 2012 +1300

    Fix sql error in bulk user deletion (bug #916998)

    When a user is deleted, deletion of notification_internal_activity
    records can fail with a foreign key error when another row in
    notification_internal_activity has a parent field pointing to one of
    the records we are trying to delete. This is fixed by setting the
    parent fields to null before deletion.

    The handle_event('deleteuser') call in delete_user is also moved
    inside the transaction, to ensure that deleted users will have their
    notifications deleted correctly. Other subscribers to the deleteuser
    event in core should be unaffected.

    Change-Id: Ibc0a695e986bb175a00441f02d3e40abf38cbcde
    Signed-off-by: Richard Mansfield <email address hidden>