Changeset 12228
- Timestamp:
- Jul 11, 2009, 7:11:15 PM (14 years ago)
- Location:
- OpenPNE3/trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
OpenPNE3/trunk/config/OpenPNE.yml.sample
r12215 r12228 17 17 18 18 # メール投稿アドレスにメンバー毎にユニークなハッシュを含める 19 # Contain an individual hash to an e-mail address that is used for posting something to the SNS 20 is_mail_address_contain_hash: false 19 # Contain an individual hash for an e-mail address that is used to post something to the SNS 20 is_mail_address_contain_hash: true 21 22 # メール投稿アドレスのハッシュの長さ 23 # Length of hash for an e-mail address for posting 24 mail_address_hash_length: 12 21 25 22 26 … … 31 35 options: 32 36 37 33 38 ###################################### 34 39 # プロキシ (Proxy) -
OpenPNE3/trunk/config/ProjectConfiguration.class.php.sample
r12227 r12228 4 4 sfCoreAutoload::register(); 5 5 6 define('OPENPNE_CONFIGURAIOTN_SAMPLE_HASH', ' 64b6863a70e4a74930c6c00e140d61f7');6 define('OPENPNE_CONFIGURAIOTN_SAMPLE_HASH', 'ffc9f45bbeb1cb8832c211b87f225c8d'); 7 7 8 8 class ProjectConfiguration extends sfProjectConfiguration -
OpenPNE3/trunk/lib/helper/opUtilHelper.php
r12056 r12228 553 553 $files = array_merge(array(sfConfig::get('sf_apps_dir').$configPath), $configuration->globEnablePlugin('/apps'.$configPath)); 554 554 555 $user = sfContext::getInstance()->getUser(); 556 557 if (sfConfig::get('op_is_mail_address_contain_hash') && $user->hasCredential('SNSMember')) 558 { 559 $params['hash'] = $user->getMember()->getMailAddressHash(); 560 } 561 555 562 $routing = new opMailRouting(new sfEventDispatcher()); 556 563 $config = new sfRoutingConfigHandler(); -
OpenPNE3/trunk/lib/model/doctrine/Member.class.php
r12110 r12228 265 265 return parent::delete($conn); 266 266 } 267 268 public function getMailAddressHash($length = null) 269 { 270 if (is_null($length)) 271 { 272 $length = sfConfig::get('op_mail_address_hash_length', 12); 273 } 274 275 $hash = $this->getConfig('mail_address_hash'); 276 if (!$hash) 277 { 278 $hash = md5(strval($this->id).$this->getConfig('password')); 279 } 280 281 return substr($hash, 0, (int)$length); 282 } 267 283 } -
OpenPNE3/trunk/lib/model/doctrine/MemberImage.class.php
r11479 r12228 18 18 } 19 19 20 $primaryImage = $this->Member-> Image;20 $primaryImage = $this->Member->MemberImage; 21 21 if ($primaryImage) 22 22 { -
OpenPNE3/trunk/lib/routing/opMailRoute.class.php
r11786 r12228 28 28 { 29 29 $this->member = $config->getMember(); 30 if (isset($this->requirements['hash'])) 31 { 32 $hash = $this->member->getMailAddressHash(); 33 if (!isset($this->parameters['hash']) || $hash !== $this->parameters['hash']) 34 { 35 $this->member = null; 36 } 37 } 30 38 } 31 39 }
Note: See TracChangeset
for help on using the changeset viewer.