// get new values
$saveOptions = $this->optionHandler->save();
- // save values
- $sql = "UPDATE wcf".WCF_N."_user_option
- SET defaultValue = ?
- WHERE optionID = ?";
- $statement = WCF::getDB()->prepareStatement($sql);
- foreach ($saveOptions as $optionID => $value) {
- $statement->execute(array($value, $optionID));
- }
-
// apply changes
if ($this->applyChangesToExistingUsers) {
$optionIDs = array_keys($saveOptions);
}
}
+ // save values
+ $sql = "UPDATE wcf".WCF_N."_user_option
+ SET defaultValue = ?
+ WHERE optionID = ?";
+ $statement = WCF::getDB()->prepareStatement($sql);
+ foreach ($saveOptions as $optionID => $value) {
+ $statement->execute(array($value, $optionID));
+ }
+
// reset cache
UserOptionCacheBuilder::getInstance()->reset();
$this->saved();