コード例 #1
0
 /**
  * If the given passwords are valid
  *
  * @param string $value The value
  *
  * @return boolean
  */
 public function isValid($value)
 {
     $result = true;
     if (!$this->model->_isDirty($this->propertyName)) {
         $result = true;
     } elseif ($this->userRepository->countByField($this->propertyName, $value)) {
         $this->addError(\TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('error_notunique_local', 'SfRegister'), 1301599608);
         $result = false;
     } elseif ($this->options['global'] && $this->userRepository->countByFieldGlobal($this->propertyName, $value)) {
         $this->addError(\TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('error_notunique_global', 'SfRegister'), 1301599619);
         $result = false;
     }
     return $result;
 }