예제 #1
0
 public function commit()
 {
     if (!parent::commit()) {
         return false;
     }
     $id = $this->get('id');
     if ($id === false) {
         return false;
     }
     fieldMemberPassword::createSettingsTable();
     $this->rememberSalt();
     $fields = array('field_id' => $id, 'length' => $this->get('length'), 'strength' => $this->get('strength'), 'code_expiry' => $this->get('code_expiry'));
     if ($this->get('salt')) {
         $fields['salt'] = $this->get('salt');
     }
     return FieldManager::saveSettings($id, $fields);
 }
예제 #2
0
 public function commit()
 {
     if (!parent::commit()) {
         return false;
     }
     $id = $this->get('id');
     if ($id === false) {
         return false;
     }
     fieldMemberPassword::createSettingsTable();
     $this->rememberSalt();
     $fields = array('field_id' => $id, 'length' => $this->get('length'), 'strength' => $this->get('strength'), 'salt' => $this->get('salt'), 'code_expiry' => $this->get('code_expiry'));
     Symphony::Database()->query("DELETE FROM `tbl_fields_" . $this->handle() . "` WHERE `field_id` = '{$id}' LIMIT 1");
     return Symphony::Database()->insert($fields, 'tbl_fields_' . $this->handle());
 }