mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
Try to maintain user preferences synchronised between DB and $USER.
Merged from MOODLE_15_STABLE
This commit is contained in:
parent
861480ccab
commit
49d005eefa
@ -763,6 +763,12 @@ function unset_user_preference($name, $userid=NULL) {
|
||||
}
|
||||
}
|
||||
|
||||
//Delete the preference from $USER
|
||||
if (isset($USER->preference[$name])) {
|
||||
unset($USER->preference[$name]);
|
||||
}
|
||||
|
||||
//Then from DB
|
||||
return delete_records('user_preferences', 'userid', $userid, 'name', $name);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user