mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 04:30:15 +01:00
Handle forcetimezone correctly (99)
This commit is contained in:
parent
bcb1636ace
commit
19626cf0a9
@ -99,11 +99,10 @@
|
||||
$usernew->htmleditor = clean_param($usernew->htmleditor, PARAM_INT);
|
||||
$usernew->emailstop = clean_param($usernew->emailstop, PARAM_INT);
|
||||
|
||||
if(!empty($CFG->forcetimezone) && isset($usernew->timezone)) {
|
||||
if (($CFG->forcetimezone != 99) && isset($usernew->timezone)) {
|
||||
// Don't allow changing this in any way if a timezone is forced
|
||||
unset($usernew->timezone);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
// Some replaces to prevent SQL injections
|
||||
$usernew->timezone = str_replace(';', '', $usernew->timezone);
|
||||
$usernew->timezone = str_replace('\'', '', $usernew->timezone);
|
||||
|
Loading…
x
Reference in New Issue
Block a user