mirror of
https://github.com/moodle/moodle.git
synced 2025-08-07 01:46:45 +02:00
MDL-44342 Airnotifier: Bug in retrieving user prefs (fixes fail in unit test)
This commit is contained in:
parent
2bb01d13cb
commit
0734383d63
1 changed files with 3 additions and 3 deletions
|
@ -156,12 +156,12 @@ class message_airnotifier_external extends external_api {
|
||||||
|
|
||||||
// First get forced settings.
|
// First get forced settings.
|
||||||
if ($forcedpref = get_config('message', $prefname)) {
|
if ($forcedpref = get_config('message', $prefname)) {
|
||||||
$prefstocheck = explode(',', $forcedpref);
|
$prefstocheck = array_merge($prefstocheck, explode(',', $forcedpref));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Then get user settings.
|
// Then get user settings.
|
||||||
if ($userpref = get_user_preferences($prefname, '', $user->id)) {
|
if ($userpref = get_user_preferences($prefname, '', $user->id)) {
|
||||||
$prefstocheck += explode(',', $userpref);
|
$prefstocheck = array_merge($prefstocheck, explode(',', $userpref));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (in_array('airnotifier', $prefstocheck)) {
|
if (in_array('airnotifier', $prefstocheck)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue