Skip to content
Browse files

Merge branch 'MDL-27360-MOODLE_21_STABLE' of git://github.com/mouneyr…

…ac/moodle into MOODLE_21_STABLE
  • Loading branch information...
2 parents dbc4107 + 4bdff2e commit de655be9ca432c2b5ae313b64c77b11d76853a79 @stronk7 stronk7 committed Feb 7, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 lib/moodlelib.php
View
6 lib/moodlelib.php
@@ -3470,6 +3470,12 @@ function delete_user($user) {
// last course access not necessary either
$DB->delete_records('user_lastaccess', array('userid'=>$user->id));
+ // remove all user tokens
+ $DB->delete_records('external_tokens', array('userid'=>$user->id));
+
+ // unauthorise the user for all services
+ $DB->delete_records('external_services_users', array('userid'=>$user->id));
+
// now do a final accesslib cleanup - removes all role assignments in user context and context itself
delete_context(CONTEXT_USER, $user->id);

0 comments on commit de655be

Please sign in to comment.
Something went wrong with that request. Please try again.