use wcf\system\user\group\assignment\UserGroupAssignmentHandler;
use wcf\system\user\storage\UserStorageHandler;
use wcf\system\WCF;
+use wcf\util\MessageUtil;
use wcf\util\StringUtil;
/**
public function save() {
$userTitle = null;
if (isset($this->parameters['values']['__userTitle'])) {
- $userTitle = $this->parameters['values']['__userTitle'];
+ $userTitle = StringUtil::trim(MessageUtil::stripCrap($this->parameters['values']['__userTitle']));
unset($this->parameters['values']['__userTitle']);
}
use wcf\system\option\ISearchableConditionUserOption;
use wcf\system\option\OptionHandler;
use wcf\util\DateUtil;
+use wcf\util\MessageUtil;
/**
* Handles user options.
public function readUserInput(array &$source) {
parent::readUserInput($source);
+ // remove 4 byte utf-8 characters (e.g. emoji)
+ foreach ($this->rawValues as &$value) {
+ if (is_string($value)) $value = MessageUtil::stripCrap($value);
+ }
+
if ($this->searchMode) {
$this->optionValues = $this->rawValues;
}