mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
MDL-44342 Airnotifier: Bug in retrieving user prefs (fixes fail in unit test)
This commit is contained in:
parent
2bb01d13cb
commit
0734383d63
@ -156,12 +156,12 @@ class message_airnotifier_external extends external_api {
|
||||
|
||||
// First get forced settings.
|
||||
if ($forcedpref = get_config('message', $prefname)) {
|
||||
$prefstocheck = explode(',', $forcedpref);
|
||||
$prefstocheck = array_merge($prefstocheck, explode(',', $forcedpref));
|
||||
}
|
||||
|
||||
// Then get user settings.
|
||||
if ($userpref = get_user_preferences($prefname, '', $user->id)) {
|
||||
$prefstocheck += explode(',', $userpref);
|
||||
$prefstocheck = array_merge($prefstocheck, explode(',', $userpref));
|
||||
}
|
||||
|
||||
if (in_array('airnotifier', $prefstocheck)) {
|
||||
@ -212,4 +212,4 @@ class message_airnotifier_external extends external_api {
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user