ここの情報は古いです。ご理解頂いた上でお取り扱いください。

Changeset 10971


Ignore:
Timestamp:
Mar 10, 2009, 11:47:33 AM (13 years ago)
Author:
ShogoKawahara
Message:

fixed Member::getEmailAddress() and Member::getEmailAddresses()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE3/trunk/lib/model/Member.php

    r10970 r10971  
    186186    }
    187187
    188     $memberPcAddressConfig = MemberConfigPeer::retrieveByNameAndMemberId('pc_address', $this->getId());
    189     $memberMobileAddressConfig = MemberConfigPeer::retrieveByNameAndMemberId('mobile_address', $this->getId());
    190 
    191     if ($memberMobileAddressConfig && ($isPriorityMobile || !$memberPcAddressConfig))
    192     {
    193       return $memberMobileAddressConfig->getValue();
    194     }
    195 
    196     if ($memberPcAddressConfig)
    197     {
    198       return $memberPcAddressConfig->getValue();
     188    $memberPcAddress     = $this->getConfig('pc_address');
     189    $memberMobileAddress = $this->getConfig('mobile_address');
     190
     191    if ($memberMobileAddress && ($isPriorityMobile || !$memberPcAddress))
     192    {
     193      return $memberMobileAddress;
     194    }
     195
     196    if ($memberPcAddress)
     197    {
     198      return $memberPcAddress;
    199199    }
    200200
     
    205205  {
    206206    $result = array();
    207     $memberPcAddressConfig = MemberConfigPeer::retrieveByNameAndMemberId('pc_address', $this->getId());
    208     $memberMobileAddressConfig = MemberConfigPeer::retrieveByNameAndMemberId('mobile_address', $this->getId());
    209 
    210     if ($memberPcAddressConfig)
    211     {
    212       $result[] = $memberPcAddressConfig->getValue();
    213     }
    214 
    215     if ($memberMobileAddressConfig)
    216     {
    217       $result[] = $memberMobileAddressConfig->getValue();
     207
     208    $memberPcAddress     = $this->getConfig('pc_address');
     209    $memberMobileAddress = $this->getConfig('mobile_address');
     210
     211    if ($memberPcAddress)
     212    {
     213      $result[] = $memberPcAddress;
     214    }
     215
     216    if ($memberMobileAddress)
     217    {
     218      $result[] = $memberMobileAddress;
    218219    }
    219220
Note: See TracChangeset for help on using the changeset viewer.