function execute()
{
$journal = Request::getJournal();
$subscription =& $this->subscription;
$userDao = DAORegistry::getDAO('UserDAO');
$user =& $userDao->getById($this->getData('userId'));
$subscription->setJournalId($journal->getId());
$subscription->setStatus($this->getData('status'));
$subscription->setUserId($this->getData('userId'));
$subscription->setTypeId($this->getData('typeId'));
$subscription->setMembership($this->getData('membership') ? $this->getData('membership') : null);
$subscription->setReferenceNumber($this->getData('referenceNumber') ? $this->getData('referenceNumber') : null);
$subscription->setNotes($this->getData('notes') ? $this->getData('notes') : null);
$subscriptionTypeDao = DAORegistry::getDAO('SubscriptionTypeDAO');
$nonExpiring = $subscriptionTypeDao->getSubscriptionTypeNonExpiring($this->getData('typeId'));
$subscription->setDateStart($nonExpiring ? null : $this->getData('dateStart'));
$subscription->setDateEnd($nonExpiring ? null : $this->getData('dateEnd'));
$user->setSalutation($this->getData('userSalutation'));
$user->setFirstName($this->getData('userFirstName'));
$user->setMiddleName($this->getData('userMiddleName'));
$user->setLastName($this->getData('userLastName'));
$user->setInitials($this->getData('userInitials'));
$user->setGender($this->getData('userGender'));
$user->setAffiliation($this->getData('userAffiliation'), null);
// Localized
$user->setUrl($this->getData('userUrl'));
$user->setEmail($this->getData('userEmail'));
$user->setPhone($this->getData('userPhone'));
$user->setMailingAddress($this->getData('userMailingAddress'));
$user->setCountry($this->getData('userCountry'));
$userDao->updateObject($user);
}