mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
MDL-27360 Web service tokens are displayed for deleted users
This commit is contained in:
parent
216f6d8e9d
commit
2214c4a2e8
@ -3810,6 +3810,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));
|
||||
|
||||
// force logout - may fail if file based sessions used, sorry
|
||||
session_kill_user($user->id);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user