/** * @return mixed */ public function getDefaultValue() { if ($this->getInitializeWithCurrentUserEmail()) { $user = users_UserService::getInstance()->getCurrentFrontEndUser(); if ($user !== null) { return $user->getEmailAsHtml(); } } return ''; }
/** * @param form_persistentdocument_baseform $form * @return boolean */ public function hasToUseCaptcha($form) { $currentUser = users_UserService::getInstance()->getCurrentFrontEndUser(); if ($currentUser !== null) { return false; } return $form->getUseCaptcha(); }