public function save()
 {
     parent::save();
     $user = sfContext::getInstance()->getUser();
     $user->setCulture($this->getValue('language'));
     return true;
 }
 public function save()
 {
     Doctrine::getTable('BlogRssCache')->deleteByMemberId($this->member->getId());
     parent::save();
     Doctrine::getTable('BlogRssCache')->updateByMemberId($this->member->getId());
     return true;
 }
 public function setMemberConfigWidget($name)
 {
     $result = parent::setMemberConfigWidget($name);
     if ($name === 'access_block') {
         $this->setDefault($name, $this->blockedId);
         $this->mergePostValidator(new sfValidatorCallback(array('callback' => array('MemberConfigAccessBlockForm', 'validate'), 'arguments' => array('ids' => $this->blockedId))));
     }
     return $result;
 }
 public function saveConfig($name, $value)
 {
     if ($name === 'pc_address') {
         $this->savePreConfig($name, $value);
         $memberConfig = Doctrine::getTable('MemberConfig')->retrieveByNameAndMemberId('pc_address_token', $this->member->getId(), true);
         $token = $memberConfig->getValue();
         $this->sendConfirmMail($token, $value, array('id' => $this->member->getId(), 'type' => $name));
         return true;
     }
     parent::saveConfig($name, $value);
 }
 public function __construct(Member $member = null, $options = array(), $CSRFSecret = null)
 {
     parent::__construct($member, $options, $CSRFSecret);
     $count = count(opConfig::get('daily_news_day'));
     $i18n = sfContext::getInstance()->getI18N();
     $translated = $i18n->__('[1]Send once a week (%2%)|[2]Send twice a week (%2%)|(2,+Inf]Send %1% times a week (%2%)', array('%1%' => $count, '%2%' => implode(',', $this->generateDayList())));
     $choice = new sfChoiceFormat();
     $retval = $choice->format($translated, $count);
     $options = $this->widgetSchema['daily_news']->getOptions();
     $options['choices'][1] = $retval;
     $this->widgetSchema['daily_news']->setOptions($options);
 }
 public function __construct(Member $member = null, $options = array(), $CSRFSecret = null)
 {
     parent::__construct($member, $options, $CSRFSecret);
     if (Doctrine::getTable('SnsConfig')->get('is_allow_config_public_flag_profile_page')) {
         unset($this['profile_page_public_flag']);
     }
     if (!Doctrine::getTable('SnsConfig')->get('is_allow_web_public_flag_age')) {
         $widget = $this->widgetSchema['age_public_flag'];
         $choices = $widget->getOption('choices');
         unset($choices[4]);
         $widget->setOption('choices', $choices);
         $this->validatorSchema['age_public_flag']->setOption('choices', array_keys($choices));
     }
 }
 public function save()
 {
     if ($this->isOAuthAuthenticate() && array_key_exists(self::IS_GOOGLE_CALENDAR_OAUTH_KEY_REVOKE, $this->values)) {
         $isDelete = (bool) $this->values[self::IS_GOOGLE_CALENDAR_OAUTH_KEY_REVOKE];
         unset($this->values[self::IS_GOOGLE_CALENDAR_OAUTH_KEY_REVOKE]);
         if ($isDelete) {
             $con = opDoctrineQuery::getMasterConnection();
             $con->beginTransaction();
             try {
                 $this->opCalendarOAuth->getClient()->revokeToken();
                 opCalendarPluginToolkit::deleteMemberGoogleCalendar($this->member);
                 $con->commit();
             } catch (Exception $e) {
                 $con->rollback();
                 return false;
             }
         }
     }
     return parent::save();
 }
 public function save()
 {
     parent::save();
     return true;
 }
 public function save()
 {
     unset($this->values['now_password']);
     parent::save();
 }
 public function __construct(Member $member = null, $options = array(), $CSRFSecret = null)
 {
     parent::__construct($member, $options, $CSRFSecret);
 }