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

Changeset 255


Ignore:
Timestamp:
Sep 26, 2006, 7:10:23 PM (16 years ago)
Author:
takanashi
Message:

入会時情報確定のバリデーション処理追加

Location:
OpenPNE/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE/trunk/public_html/cap.php

    r227 r255  
    11<?php
     2/**
     3 * @copyright 2005-2006 OpenPNE Project
     4 * @license   http://www.php.net/license/3_01.txt PHP License 3.01
     5 * @deprecated File deprecated in Release 1.9.0
     6 */
    27
    38require_once './config.inc.php';
  • OpenPNE/trunk/webapp/modules/pc/do/o_regist_prof.php

    r228 r255  
    3131
    3232        $validator = new OpenPNE_Validator();
    33         $validator->addRequests($_REQUEST);
     33        if ($mode == 'register') {
     34            session_start();
     35            $validator->addRequests($_SESSION['prof']);
     36            $requests['password2'] = $_SESSION['prof']['password2'];
     37            unset($_SESSION['prof']);
     38        } else {
     39            $validator->addRequests($_REQUEST);
     40        }
    3441        $validator->addRules($this->_getValidateRules());
    35         if ($mode != 'register' && $validator->validate()) {
     42        if ($validator->validate()) {
    3643            $errors = $validator->getErrors();
    3744        }
    3845
    39         if ($mode != 'register') {
    40             $prof = $validator->getParams();
    41         }else{
    42             session_start();
    43             $prof = $_SESSION['prof'];
    44             unset($_SESSION['prof']);
    45         }
     46        $prof = $validator->getParams();
    4647
    4748        switch ($prof['public_flag_birth_year']) {
     
    5556        }
    5657
    57         if ($mode != 'register' && $prof['password'] != $requests['password2']) {
     58        if ($prof['password'] != $requests['password2']) {
    5859            $errors['password2'] = 'パスワードが一致していません';
    5960        }
Note: See TracChangeset for help on using the changeset viewer.