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

Changeset 8676


Ignore:
Timestamp:
Oct 10, 2008, 7:08:10 PM (11 years ago)
Author:
ebihara
Message:

#2877:deleted authentication_pc_address.PASSWORD

Location:
OpenPNE3/trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE3/trunk/config/generated-opAuthPCAddressPlugin-schema-transformed.xml

    r8102 r8676  
    11<?xml version="1.0" encoding="UTF-8"?>
    2 <database defaultPhpNamingMethod="underscore" heavyIndexing="false" name="propel" package="plugins.opAuthPCAddressPlugin.lib.model" defaultIdMethod="native"><table skipSql="false" abstract="false" name="authentication_pc_address"><column lazyLoad="false" name="id" type="integer" required="true" primaryKey="true" autoIncrement="true"/><column primaryKey="false" required="false" autoIncrement="false" lazyLoad="false" name="member_id" type="integer"/><column primaryKey="false" required="false" autoIncrement="false" lazyLoad="false" name="password" type="varchar" size="32"/><column primaryKey="false" required="false" autoIncrement="false" lazyLoad="false" name="register_session" type="varchar" size="32"/><foreign-key onDelete="none" onUpdate="none" foreignTable="member"><reference local="member_id" foreign="id"/></foreign-key></table></database>
     2<database defaultPhpNamingMethod="underscore" heavyIndexing="false" name="propel" package="plugins.opAuthPCAddressPlugin.lib.model" defaultIdMethod="native"><table skipSql="false" abstract="false" name="authentication_pc_address"><column lazyLoad="false" name="id" type="integer" required="true" primaryKey="true" autoIncrement="true"/><column primaryKey="false" required="false" autoIncrement="false" lazyLoad="false" name="member_id" type="integer"/><column primaryKey="false" required="false" autoIncrement="false" lazyLoad="false" name="register_session" type="varchar" size="32"/><foreign-key onDelete="none" onUpdate="none" foreignTable="member"><reference local="member_id" foreign="id"/></foreign-key></table></database>
  • OpenPNE3/trunk/data/fixtures/002_import_first_member.yml

    r8102 r8676  
    1414  first_pc_address:
    1515    member_id: first_member
    16     password: <?php echo md5('password') . "\n"; ?>
    1716
    1817MemberProfile:
     
    3231    name: "pc_address"
    3332    value: "sns@example.com"
     33
     34  first_member_password:
     35    member_id: first_member
     36    name: "password"
     37    value: <?php echo md5('password') . "\n"; ?>
     38
  • OpenPNE3/trunk/data/member_config.yml

    r8613 r8676  
    2626      FormType:   "input"
    2727      ValueType:  "email"
    28       IsRegist:   true
     28      IsRegist:   false
    2929      IsConfig:   true
    3030      IsRequired: false
  • OpenPNE3/trunk/data/sql/plugins.opAuthPCAddressPlugin.lib.model.schema.sql

    r8102 r8676  
    1515        `id` INTEGER  NOT NULL AUTO_INCREMENT,
    1616        `member_id` INTEGER,
    17         `password` VARCHAR(32),
    1817        `register_session` VARCHAR(32),
    1918        PRIMARY KEY (`id`),
  • OpenPNE3/trunk/plugins/opAuthPCAddressPlugin/config/schema.yml

    r8102 r8676  
    55    id: ~
    66    member_id: { type: integer, foreignTable: member, foreignReference: id }
    7     password: { type: varchar(32) }
    87    register_session: { type: varchar(32) }
  • OpenPNE3/trunk/plugins/opAuthPCAddressPlugin/lib/form/base/BaseAuthenticationPcAddressForm.class.php

    r8102 r8676  
    1515      'id'               => new sfWidgetFormInputHidden(),
    1616      'member_id'        => new sfWidgetFormPropelSelect(array('model' => 'Member', 'add_empty' => true)),
    17       'password'         => new sfWidgetFormInput(),
    1817      'register_session' => new sfWidgetFormInput(),
    1918    ));
     
    2221      'id'               => new sfValidatorPropelChoice(array('model' => 'AuthenticationPcAddress', 'column' => 'id', 'required' => false)),
    2322      'member_id'        => new sfValidatorPropelChoice(array('model' => 'Member', 'column' => 'id', 'required' => false)),
    24       'password'         => new sfValidatorString(array('max_length' => 32, 'required' => false)),
    2523      'register_session' => new sfValidatorString(array('max_length' => 32, 'required' => false)),
    2624    ));
  • OpenPNE3/trunk/plugins/opAuthPCAddressPlugin/lib/form/sfOpenPNEAuthForm_PCAddress.class.php

    r8567 r8676  
    3131    parent::setForRegisterWidgets($member);
    3232
    33     $this->validatorSchema['password_confirm'] = new sfValidatorString();
    34     $this->widgetSchema['password_confirm'] = new sfWidgetFormInputPassword();
    35 
    36     $this->mergePostValidator(new sfValidatorSchemaCompare('password', '==', 'password_confirm'));
    37 
    3833    // FIXME
    3934    unset($this->configForm->validatorSchema['pc_address']);
    4035    unset($this->configForm->widgetSchema['pc_address']);
    41     unset($this->validatorSchema['pc_address']);
    42     unset($this->widgetSchema['pc_address']);
     36    $this->unsetFormField('pc_address');
     37    $this->unsetFormField('password');
     38  }
     39
     40  private function unsetFormField($name)
     41  {
     42    unset($this->validatorSchema[$name]);
     43    unset($this->widgetSchema[$name]);
    4344  }
    4445}
  • OpenPNE3/trunk/plugins/opAuthPCAddressPlugin/lib/model/map/AuthenticationPcAddressMapBuilder.php

    r8102 r8676  
    3737                $tMap->addForeignKey('MEMBER_ID', 'MemberId', 'int', CreoleTypes::INTEGER, 'member', 'ID', false, null);
    3838
    39                 $tMap->addColumn('PASSWORD', 'Password', 'string', CreoleTypes::VARCHAR, false, 32);
    40 
    4139                $tMap->addColumn('REGISTER_SESSION', 'RegisterSession', 'string', CreoleTypes::VARCHAR, false, 32);
    4240
  • OpenPNE3/trunk/plugins/opAuthPCAddressPlugin/lib/model/om/BaseAuthenticationPcAddress.php

    r8102 r8676  
    1818
    1919       
    20         protected $password;
    21 
    22 
    23        
    2420        protected $register_session;
    2521
     
    4541
    4642                return $this->member_id;
    47         }
    48 
    49        
    50         public function getPassword()
    51         {
    52 
    53                 return $this->password;
    5443        }
    5544
     
    9483        }
    9584       
    96         public function setPassword($v)
    97         {
    98 
    99                                                 if ($v !== null && !is_string($v)) {
    100                         $v = (string) $v;
    101                 }
    102 
    103                 if ($this->password !== $v) {
    104                         $this->password = $v;
    105                         $this->modifiedColumns[] = AuthenticationPcAddressPeer::PASSWORD;
    106                 }
    107 
    108         }
    109        
    11085        public function setRegisterSession($v)
    11186        {
     
    130105                        $this->member_id = $rs->getInt($startcol + 1);
    131106
    132                         $this->password = $rs->getString($startcol + 2);
    133 
    134                         $this->register_session = $rs->getString($startcol + 3);
     107                        $this->register_session = $rs->getString($startcol + 2);
    135108
    136109                        $this->resetModified();
     
    138111                        $this->setNew(false);
    139112
    140                                                 return $startcol + 4;
     113                                                return $startcol + 3;
    141114                } catch (Exception $e) {
    142115                        throw new PropelException("Error populating AuthenticationPcAddress object", $e);
     
    289262                                break;
    290263                        case 2:
    291                                 return $this->getPassword();
    292                                 break;
    293                         case 3:
    294264                                return $this->getRegisterSession();
    295265                                break;
     
    306276                        $keys[0] => $this->getId(),
    307277                        $keys[1] => $this->getMemberId(),
    308                         $keys[2] => $this->getPassword(),
    309                         $keys[3] => $this->getRegisterSession(),
     278                        $keys[2] => $this->getRegisterSession(),
    310279                );
    311280                return $result;
     
    330299                                break;
    331300                        case 2:
    332                                 $this->setPassword($value);
    333                                 break;
    334                         case 3:
    335301                                $this->setRegisterSession($value);
    336302                                break;
     
    344310                if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]);
    345311                if (array_key_exists($keys[1], $arr)) $this->setMemberId($arr[$keys[1]]);
    346                 if (array_key_exists($keys[2], $arr)) $this->setPassword($arr[$keys[2]]);
    347                 if (array_key_exists($keys[3], $arr)) $this->setRegisterSession($arr[$keys[3]]);
     312                if (array_key_exists($keys[2], $arr)) $this->setRegisterSession($arr[$keys[2]]);
    348313        }
    349314
     
    355320                if ($this->isColumnModified(AuthenticationPcAddressPeer::ID)) $criteria->add(AuthenticationPcAddressPeer::ID, $this->id);
    356321                if ($this->isColumnModified(AuthenticationPcAddressPeer::MEMBER_ID)) $criteria->add(AuthenticationPcAddressPeer::MEMBER_ID, $this->member_id);
    357                 if ($this->isColumnModified(AuthenticationPcAddressPeer::PASSWORD)) $criteria->add(AuthenticationPcAddressPeer::PASSWORD, $this->password);
    358322                if ($this->isColumnModified(AuthenticationPcAddressPeer::REGISTER_SESSION)) $criteria->add(AuthenticationPcAddressPeer::REGISTER_SESSION, $this->register_session);
    359323
     
    388352
    389353                $copyObj->setMemberId($this->member_id);
    390 
    391                 $copyObj->setPassword($this->password);
    392354
    393355                $copyObj->setRegisterSession($this->register_session);
  • OpenPNE3/trunk/plugins/opAuthPCAddressPlugin/lib/model/om/BaseAuthenticationPcAddressPeer.php

    r8102 r8676  
    1414
    1515       
    16         const NUM_COLUMNS = 4;
     16        const NUM_COLUMNS = 3;
    1717
    1818       
     
    2727
    2828       
    29         const PASSWORD = 'authentication_pc_address.PASSWORD';
    30 
    31        
    3229        const REGISTER_SESSION = 'authentication_pc_address.REGISTER_SESSION';
    3330
     
    3835       
    3936        private static $fieldNames = array (
    40                 BasePeer::TYPE_PHPNAME => array ('Id', 'MemberId', 'Password', 'RegisterSession', ),
    41                 BasePeer::TYPE_COLNAME => array (AuthenticationPcAddressPeer::ID, AuthenticationPcAddressPeer::MEMBER_ID, AuthenticationPcAddressPeer::PASSWORD, AuthenticationPcAddressPeer::REGISTER_SESSION, ),
    42                 BasePeer::TYPE_FIELDNAME => array ('id', 'member_id', 'password', 'register_session', ),
    43                 BasePeer::TYPE_NUM => array (0, 1, 2, 3, )
     37                BasePeer::TYPE_PHPNAME => array ('Id', 'MemberId', 'RegisterSession', ),
     38                BasePeer::TYPE_COLNAME => array (AuthenticationPcAddressPeer::ID, AuthenticationPcAddressPeer::MEMBER_ID, AuthenticationPcAddressPeer::REGISTER_SESSION, ),
     39                BasePeer::TYPE_FIELDNAME => array ('id', 'member_id', 'register_session', ),
     40                BasePeer::TYPE_NUM => array (0, 1, 2, )
    4441        );
    4542
    4643       
    4744        private static $fieldKeys = array (
    48                 BasePeer::TYPE_PHPNAME => array ('Id' => 0, 'MemberId' => 1, 'Password' => 2, 'RegisterSession' => 3, ),
    49                 BasePeer::TYPE_COLNAME => array (AuthenticationPcAddressPeer::ID => 0, AuthenticationPcAddressPeer::MEMBER_ID => 1, AuthenticationPcAddressPeer::PASSWORD => 2, AuthenticationPcAddressPeer::REGISTER_SESSION => 3, ),
    50                 BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'member_id' => 1, 'password' => 2, 'register_session' => 3, ),
    51                 BasePeer::TYPE_NUM => array (0, 1, 2, 3, )
     45                BasePeer::TYPE_PHPNAME => array ('Id' => 0, 'MemberId' => 1, 'RegisterSession' => 2, ),
     46                BasePeer::TYPE_COLNAME => array (AuthenticationPcAddressPeer::ID => 0, AuthenticationPcAddressPeer::MEMBER_ID => 1, AuthenticationPcAddressPeer::REGISTER_SESSION => 2, ),
     47                BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'member_id' => 1, 'register_session' => 2, ),
     48                BasePeer::TYPE_NUM => array (0, 1, 2, )
    5249        );
    5350
     
    105102
    106103                $criteria->addSelectColumn(AuthenticationPcAddressPeer::MEMBER_ID);
    107 
    108                 $criteria->addSelectColumn(AuthenticationPcAddressPeer::PASSWORD);
    109104
    110105                $criteria->addSelectColumn(AuthenticationPcAddressPeer::REGISTER_SESSION);
  • OpenPNE3/trunk/plugins/opAuthPCAddressPlugin/lib/user/sfOpenPNEAuthContainer_PCAddress.class.php

    r8613 r8676  
    9191    }
    9292
    93     $password = md5($form->getValue('password'));
    94 
    95     $authPCAddress = AuthenticationPcAddressPeer::retrieveByMemberId($memberId);
    96     $authPCAddress->setPassword($password);
    97 
    98     return $authPCAddress->save();
     93    return true;
    9994  }
    10095
Note: See TracChangeset for help on using the changeset viewer.