Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 2.5.4, 2.6.1, 2.7
-
Component/s: Dashboard (My home), Database SQL/XMLDB
-
Labels:
-
Testing Instructions:
-
Affected Branches:MOODLE_25_STABLE, MOODLE_26_STABLE, MOODLE_27_STABLE
-
Fixed Branches:MOODLE_25_STABLE, MOODLE_26_STABLE
-
Pull from Repository:
-
Pull Master Branch:master_
MDL-43797
Description
Removal of all block instances on user pages is being handled by delete_context(CONTEXT_USER, $user->id) when user is deleted. However, if a user had a customised "My Home" page, a record will still remains in database.
It looks like all we need to do is add:
$DB->delete_records('my_pages', array('userid' => $user->id, 'private' => 1));
to delete_user() method. We will submit proposed fix in a bit.