commit 16e57cae68f57ca57a9efadd7f41c82be8cc5223
Author: hasse <hasegawa@i-hearts.jp>
Date:   Fri Mar 11 01:01:53 2016 -0500

    パスワード再設定100％

diff --git a/app/Controller/TopController.php b/app/Controller/TopController.php
index e3a44e7..425114c 100755
--- a/app/Controller/TopController.php
+++ b/app/Controller/TopController.php
@@ -116,7 +116,7 @@ class TopController extends AppController {
 		$Email->viewVars(array('name'=>$name,'comment'=>$comment));
 		$Email->from( MAIL_FROM );
 		$Email->to($mail);
-		$Email->subject('[PICT CODE]問い合わせ');
+		$Email->subject('【PictCode】お問い合わせいただき、ありがとうございます。');
 		$Email->send();
 	}
 
diff --git a/app/Controller/UsersController.php b/app/Controller/UsersController.php
index f56f659..1ef6740 100755
--- a/app/Controller/UsersController.php
+++ b/app/Controller/UsersController.php
@@ -94,18 +94,18 @@ class UsersController extends AppController {
             DS . 'users' .          // コントローラ
             DS . 'activate' .                       // アクション
             DS . $this->User->id .                  // ユーザID
-            DS . $this->User->getActivationHash();  // ハッシュ値
+            DS . $this->User->activationHash();  // ハッシュ値
         $url = Router::url( $url, true);  // ドメイン(+サブディレクトリ)を付与
 		$comment = $url;
 
 		$Email = new CakeEmail();
 		$Email->charset('ISO-2022-JP');
 		$Email->emailFormat('text');
-		$Email->template('user_register');
+		$Email->template('register_mail');
 		$Email->viewVars(array('name'=>$name,'comment'=>$comment));
 		$Email->from( MAIL_FROM ); //MAIL_FROM：Config/const.phpにて定義
 		$Email->to($mail);
-		$Email->subject('[PICT CODE]問い合わせ');
+		$Email->subject('【PictCode】仮登録が完了しました。');
 		$Email->send();
 	    }
 
@@ -117,14 +117,29 @@ class UsersController extends AppController {
 	public function activate( $user_id = null, $in_hash = null) {
 	    // UserモデルにIDをセット
 	    $this->User->id = $user_id;
-	    if ($this->User->exists() && $in_hash == $this->User->getActivationHash()) {
+	    if ($this->User->exists() && $in_hash == $this->User->activationHash()) {
 	    // 本登録に有効なURL
 	        // statusフィールドを1に更新
 	        $this->User->saveField( 'status', 1);
 	        $this->Session->setFlash( 'Your account has been activated.');
+			
+			$mail = $this->Session->read('register.User.email');
+			// exit;
+
+			$Email = new CakeEmail();
+			$Email->charset('ISO-2022-JP');
+			$Email->emailFormat('text');
+			$Email->template('register_comp');
+			// $Email->viewVars(array('name'=>$name,'comment'=>$comment));
+			$Email->from( MAIL_FROM ); //MAIL_FROM：Config/const.phpにて定義
+			$Email->to($mail);
+			$Email->subject('【PictCode】本登録が完了しました。');
+			$Email->send();
+
 	    }else{
 	    // 本登録に無効なURL
 	        $this->Session->setFlash( 'Invalid activation URL');
+			return $this->redirect(array('controller' => 'top', 'action' => 'index'));
 	    }
 	}
 	
@@ -198,21 +213,11 @@ class UsersController extends AppController {
  * @return void
  */
 	public function login() {
-<<<<<<< HEAD
-		// if($this->Auth->user()){
-		// 	$this->redirect($this->Auth->redirectUrl());                          
-		// }
-=======
-		//var_dump(Security::hash( "123", 'blowfish'));
-		if($this->register->user()){
-			$this->redirect($this->Auth->redirectUrl());                          
+		if($this->Auth->user()){
+			// $this->redirect($this->Auth->redirectUrl());                          
+					$this->redirect('/users/login_top');                          
 		}
->>>>>>> origin/develop
 		if ($this->request->is('post')) {
-<<<<<<< HEAD
-			if ($this->register->login()) {
-				$this->redirect('/Users/login_top');                          
-=======
 			if ($this->Auth->login()) {
 		 //    $options = array('conditions' => array('User.email' => $this->Auth->user('User.email'),'User.status' => 1));
 			// $this->request->data = $this->User->find('first', $options);
@@ -224,7 +229,6 @@ class UsersController extends AppController {
 				    'key' => 'positive',
 					));
 				}
->>>>>>> 8fa10255c509b6b77d694b7366878172b605ee59
 			} else {
 				$this->Flash->loginerror('ニックネームか　パスワードにまちがいが あるよ！', array(
 				    'key' => 'positive',
@@ -240,7 +244,7 @@ class UsersController extends AppController {
  * @return void
  */
 	public function logout() {
-	    $this->redirect($this->register->logout());
+	    $this->redirect($this->Auth->logout());
 	}
 
 
@@ -292,7 +296,7 @@ class UsersController extends AppController {
 	            //  メール送信
 		$this->set('register',$this->Session->read('register'));
 		$mail = $this->Session->read('register.User.email');
-		$options = array('conditions' => array('User.email' => $mail));
+		$options = array('conditions' => array('User.email' => $mail, 'User.status' => 1));
 		$user = $this->User->find('first', $options);
 		$name = $user['User']['login_id'];
 
@@ -301,7 +305,7 @@ class UsersController extends AppController {
             DS . 'users' .          // コントローラ
             DS . 'newpwd' .                       // アクション
             DS . $user['User']['id'] .                  // ユーザID
-            DS . $this->User->getActivationHash();  // ハッシュ値
+            DS . $this->User->getActivationHash($user['User']['id']);  // ハッシュ値
         $url = Router::url( $url, true);  // ドメイン(+サブディレクトリ)を付与
 		$comment = $url;
 		$Email = new CakeEmail();
@@ -311,7 +315,7 @@ class UsersController extends AppController {
 		$Email->viewVars(array('name'=>$name,'comment'=>$comment));
 		$Email->from( MAIL_FROM ); //MAIL_FROM：Config/const.phpにて定義
 		$Email->to($mail);
-		$Email->subject('[PICT CODE]問い合わせ');
+		$Email->subject('【PictCode】パスワードの再発行を受け付けました。');
 		$Email->send();
 	    }
 
@@ -327,98 +331,62 @@ class UsersController extends AppController {
 
 	    // UserモデルにIDをセット
 	    $this->User->id = $user_id;
-	    if ($this->User->exists() && $in_hash == $this->User->getActivationHash()) {
-	        $this->Session->setFlash( '無効なURLです');
-			return $this->redirect(array('controller' => 'top', 'action' => 'index'));
-
-	    }else{
+	    if ($this->User->exists() && $in_hash == $this->User->activationHash()) {
+	    	//idとハッシュ値が正規の場合、パスワード変更画面を表示
 		    if ($this->request->is(array('post', 'put'))) {
 
 				$this->set('user', $this->request->data);
 				if ($this->User->save($this->request->data)) {
-					return $this->redirect(array('action' => 'reset_pwd_comp_mail'));
+					return $this->redirect(array('action' => 'reset_pwd_comp_mail',$user_id));
 				} 
 			} else {
 			    $options = array('conditions' => array('User.id' => $user_id,'User.status' => 1));
 				$this->request->data = $this->User->find('first', $options);
 				$this->set('user', $this->request->data);
-					  //   	var_dump($this->request->data);
-		    	// exit;
 			}
-	    }
+	    }else{
+	    	//idとハッシュ値が不正の場合、トップページにリダイレクト
+			$this->Session->setFlash( '無効なURLです');
+			return $this->redirect(array('controller' => 'top', 'action' => 'index'));
 
-	 //    $options = array('conditions' => array('User.id' => $user_id,'User.status' => 1));
-		// // $this->request->data = $this->set('user',$this->User->find('first', $options));
-		// $this->set('user',$this->User->find('first', $options));
-		// // $this->set('user', $this->request->data);
-
-
-	 //    // if ($this->User->exists() && $in_hash == $this->User->getActivationHash()) {
-	 //    // var_dump($this->request->data);
-	 //    // exit;
-	 //        if ($this->request->is(array('post', 'put'))) {
-		// 		// if($this->User->validates()){
-
-	 //            	$this->User->save($this->request->data);
-		// 			$this->redirect(array('action'=>'reset_pwd_comp_mail'));
-	 //     //        } else {
-		// 				// $this->Flash->loginerror('パスワードが一致しません。誤りがないかもう一度ご確認の上、正確にご入力ください。', array(
-		// 				//     'key' => 'positive',
-		// 				// 	));
-	 //     //        }
-	 //   //      } else {
-		// 	 //    $options = array('conditions' => array('User.id' => $user_id,'User.status' => 1));
-		// 		// $this->request->data = $this->set('user',$this->User->find('first', $options));
-		// 		// // $this->set('user', $this->request->data);
-	 //   //      $this->Session->setFlash( '無効なURLですaaa');
-	 //        // }
-
-
-	 //    }else{
-	 //    // 本登録に無効なURL
-	 //        $this->Session->setFlash( '無効なURLです');
-	 //    }
+	    }
 	}
 
 /**
  * 
  */
-	public function reset_pwd_comp_mail() {
-		// if (!empty( $this->data)){
-		 //  保存
-		$this->User->validate = $this->User->new_pwd_validate;
-		    if( $this->User->save($this->request->data('user'))){
-		            //  メール送信
-			$this->set('register',$this->Session->read('register'));
+	public function reset_pwd_comp_mail($user_id = null) {
+		// $options = array('conditions' => array('User.' . $this->User->primaryKey => $user_id));
+		// $this->request->data = $this->User->find('first', $options);
+		// //バリデーションを無効にして保存
+		// $this->User->validate = $this->User->reset_pwd_comp_mail_validate;
+
+		// if( $this->User->save($this->request->data)){
+		// var_dump($this->request->data['User']);
+		// exit;
+		if( !isset($this->request->data['User'])){
+		// $this->User->save($this->request->data,false);
+		    //  メール送信
 			$mail = $this->Session->read('register.User.email');
-			// exit;
-			$options = array('conditions' => array('User.email' => $mail));
-			$user = $this->User->find('first', $options);
-			$name = $user['User']['login_id'];
-
-	        // ユーザアクティベート(本登録)用URLの作成 DSはスラッシュの意味
-	        // $url = 
-	        //     DS . 'users' .          // コントローラ
-	        //     DS . 'newpwd' .                       // アクション
-	        //     DS . $user['User']['id'] .                  // ユーザID
-	        //     DS . $this->User->getActivationHash();  // ハッシュ値
-	        // $url = Router::url( $url, true);  // ドメイン(+サブディレクトリ)を付与
-			$comment = "本文本文本文本文本文本文本文本文";
+
 			$Email = new CakeEmail();
 			$Email->charset('ISO-2022-JP');
 			$Email->emailFormat('text');
 			$Email->template('comp_reset_pwd');
-			$Email->viewVars(array('name'=>$name,'comment'=>$comment));
+			// $Email->viewVars(array('name'=>$name,'comment'=>$comment));
 			$Email->from( MAIL_FROM ); //MAIL_FROM：Config/const.phpにて定義
 			$Email->to($mail);
-			$Email->subject('[PICT CODE]問い合わせ');
+			$Email->subject('【PictCode】パスワードの再設定が完了しました。');
 			$Email->send();
-	    	}
-	    // }
-		// }else{
-	 //        exit;
-		// }
-debug($this->User->validationErrors);
+	    }
+	    else{
+		$options = array('conditions' => array('User.' . $this->User->primaryKey => $user_id));
+		$this->request->data = $this->User->find('first', $options);
+		//バリデーションを無効にして保存
+		// $this->User->validate = $this->User->reset_pwd_comp_mail_validate;
+		$this->User->save($this->request->data,false);
+	    }
+
 	}
 
 
diff --git a/app/Model/User.php b/app/Model/User.php
index 7c6022e..2b83efb 100755
--- a/app/Model/User.php
+++ b/app/Model/User.php
@@ -19,9 +19,15 @@ class User extends AppModel {
  */
 	public $validate = array(
 		'login_id' => array(
+            array(
 				'rule' => array('notBlank'),
                 'message' => 'この項目は入力必須です'
 			),
+            array( 
+                'rule' => 'isUnique', 
+                'message' => '既に登録されています'
+            ),
+        ),
         'email' => array(
         	array(
 				'rule' => array('notBlank'),
@@ -133,11 +139,11 @@ class User extends AppModel {
             ), 
         ),
 	);
-	public $new_pwd_validate = array(
+    public $new_pwd_validate = array(
 
         'password' => array(
             array(
-				'rule' => array('notBlank'),
+                'rule' => array('notBlank'),
                 'message' => 'パスワードを入力してください'
             ), 
             array(
@@ -151,11 +157,28 @@ class User extends AppModel {
         ),
         'password_confirm' => array(
             array(
-				'rule' => array('notBlank'),
+                'rule' => array('notBlank'),
                 'message' => 'パスワード(確認)を入力してください'
             ), 
         ),
-	);
+    );
+    public $reset_pwd_comp_mail_validate = array(
+
+        'password' => array(
+            array(
+                'rule' => array('notBlank'),
+                'message' => 'パスワードを入力してください'
+            ), 
+            array(
+                'rule' => array('minLength', 8), 
+                'message' => 'パスワードは8文字以上入力してください', 
+            ),
+        ),
+    );
+
+
+
+
 	public function DuplicateEmailCheck(){
 		$query = array('conditions' => array('User.email' => $this->data['User']['email'],'User.status' => 1));
 		$num = $this->find('count',$query);
@@ -189,14 +212,28 @@ class User extends AppModel {
 
     }
 
-	public function getActivationHash() {
-	    // ユーザIDの有無確認
-	    if (!isset($this->id)) {
-	        return false;
-	    }
-	    // 更新日時をハッシュ化
-	    return Security::hash( $this->field('updated'), 'md5', true);
-	}
+    public function activationHash() {
+        // ユーザIDの有無確認
+        
+        if (!isset($this->id)) {
+            return false;
+        }
+        // 更新日時をハッシュ化
+        // return Security::hash( $user_id['User']['updated'], 'md5', true);
+        return Security::hash( $this->field('updated'), 'md5', true);
+    }
+    public function getActivationHash($id) {
+        // ユーザIDの有無確認
+        $query = array('conditions' => array('User.id' => $id));
+        $user_id = $this->find('first',$query);
+        if (!isset($user_id['User']['id'])) {
+        // if (!isset($this->id)) {
+            return false;
+        }
+        // 更新日時をハッシュ化
+        return Security::hash( $user_id['User']['updated'], 'md5', true);
+        // return Security::hash( $this->field('updated'), 'md5', true);
+    }
 
 
 	//メールアドレスが登録されていない、またはメールアドレスのstatusが１ではない場合、エラーを出す
diff --git a/app/View/Emails/text/comp_reset_pwd.ctp b/app/View/Emails/text/comp_reset_pwd.ctp
index 0d2d91c..863834b 100755
--- a/app/View/Emails/text/comp_reset_pwd.ctp
+++ b/app/View/Emails/text/comp_reset_pwd.ctp
@@ -1,19 +1,27 @@
-━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
-このメールは、PICT CODE から配信されています
-━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+このメールは、PICT CODE から自動配信されています
+━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 
+PictCodeのユーザーパスワードの再設定が完了しました。設定されたパスワードは忘れないようにメモ等に残し、大切に保管してください。
+新しいパスワードで下記のURLをクリックし、ログインしてください。
 
-パスワードが変更されました。
+▼PictCode ログイン画面
+URL：
 
-変更★変更★変更	
+PictCodeに関してご不明な点、ご質問などのお問い合わせは、こちらよりお願いします。
 
-お名前：<?php echo $name;?>
+▼PictCode お問い合わせフォーム
+URL：
 
-お問い合わせ内容：
 
-<?php echo $comment;?>
+尚、このメールは、PictCodeにのユーザーパスワードの再発行を申請された方に自動配信されています。
+本内容に覚えがなくメールを受け取られた方は、お問い合わせフォーム、もしくは下記の連絡先までご連絡ください。
 
-━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
-PICT CODE カスタマーサポートセンター
-メールでのお問い合わせ： info@itkids.com
-━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+----------------------------------------------------------------------------
+■お問い合わせ先
+ IT KiDS株式会社
+ URL : http://itkids.club
+ E-Mail：office@itkids.club
+------------------------------------------------
+Copyright (C) 2016 IT KiDS Inc. All Rights Reserved.
+----------------------------------------------------------------------------
diff --git a/app/View/Emails/text/register_comp.ctp b/app/View/Emails/text/register_comp.ctp
new file mode 100755
index 0000000..9e3b5df
--- /dev/null
+++ b/app/View/Emails/text/register_comp.ctp
@@ -0,0 +1,33 @@
+━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+このメールは、PICT CODE から自動配信されています
+━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+【PictCode】への本登録が完了しました。
+
+この度は、PictCodeユーザーにご登録いただき、誠にありがとうございます。
+早速、PictCodeにログインし、誰でも簡単に、そして気軽に楽しめるPictCodeならではの「ビジュアルプログラミング」の世界を楽しみましょう。
+
+▼PictCode ログイン画面
+URL：
+
+PictCodeに関してご不明な点、ご質問などのお問い合わせは、こちらよりお願いします。
+
+▼PictCode お問い合わせフォーム
+URL：
+
+また、ログインの際にパスワードをお忘れの方は、パスワードを再発行し、再設定を行ってください。
+
+▼PictCode パスワード再発行
+URL：
+
+
+尚、このメールはPictCodeにご登録いただいた方に自動送信されています。
+
+----------------------------------------------------------------------------
+■お問い合わせ先
+ IT KiDS株式会社
+ URL : http://itkids.club
+ E-Mail：office@itkids.club
+------------------------------------------------
+Copyright (C) 2016 IT KiDS Inc. All Rights Reserved.
+----------------------------------------------------------------------------
diff --git a/app/View/Emails/text/register_mail.ctp b/app/View/Emails/text/register_mail.ctp
new file mode 100755
index 0000000..1630a80
--- /dev/null
+++ b/app/View/Emails/text/register_mail.ctp
@@ -0,0 +1,26 @@
+━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+このメールは、PICT CODE から自動配信されています
+━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+この度は、PictCodeユーザーにご登録いただき、誠にありがとうございます。
+
+▼本登録用URL
+URL：<?php echo $comment;?>
+
+PictCodeに関してご不明な点、ご質問などのお問い合わせは、こちらよりお願いします。
+
+▼PictCode お問い合わせフォーム
+URL：http://itkids.club/top/contact
+
+
+尚、このメールは、PictCodeに仮登録いただいた方に自動配信されています。
+本内容に覚えがなくメールを受け取られた方は、お問い合わせフォーム、もしくは下記の連絡先までご連絡ください。
+
+----------------------------------------------------------------------------
+■お問い合わせ先
+ IT KiDS株式会社
+ URL : http://itkids.club
+ E-Mail：office@itkids.club
+------------------------------------------------
+Copyright (C) 2016 IT KiDS Inc. All Rights Reserved.
+----------------------------------------------------------------------------
diff --git a/app/View/Emails/text/user_contact.ctp b/app/View/Emails/text/user_contact.ctp
index 7f13c51..124344a 100755
--- a/app/View/Emails/text/user_contact.ctp
+++ b/app/View/Emails/text/user_contact.ctp
@@ -1,16 +1,28 @@
-━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
-このメールは、PICT CODE から配信されています
-━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+このメールは、PICT CODE から自動配信されています
+━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 
-以下の内容で、お客様よりお問い合わせがありました。
+この度は、PictCodeにお問い合わせいただき、誠にありがとうございました。折り返し、３営業日以内に回答させていただきます。お問い合わせいただきました内容によりましては、３営業日以上お時間をいただく場合があります。予めご了承ください。
+万が一、５営業日以上経過しても返信メールが届かない場合には、大変お手数ですが、再度、お問い合わせフォームよりお問い合わせいただきますか、お電話(042-316-6388)にてお問い合わせいただきますよう、よろしくお願いいたします。
 
-お名前：<?php echo $name;?>
 
-お問い合わせ内容：
+お名前：	<?php echo $name;?>
+メールアドレス：	<?php echo $mail;?>
+郵便番号：　<?php echo $postcode;?>
+ご住所：　<?php echo $address;?>
+お電話番号：	<?php echo $tel;?>
+お問い合わせ内容：	<?php echo $comment;?>
 
-<?php echo $comment;?>
 
-━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
-PICT CODE カスタマーサポートセンター
-メールでのお問い合わせ： info@itkids.com
-━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+※ご入力いただきましたお客さまの個人情報は、本お問い合わせに関する回答以外の目的には利用いたしません。
+尚、このメールはPictCodeよりお問い合わせいただいた方に、自動送信されています。
+
+■PictCode管理会社 --------------------------------------------------------
+ IT KiDS株式会社 お問い合わせ係
+  〒184-0001
+  東京都小金井市関野町1丁目10番9号 101
+  URL : http://itkids.club
+  E-Mail : office@itkids.club
+------------------------------------------------
+Copyright (C) 2016 IT KiDS Inc. All Rights Reserved.
+----------------------------------------------------------------------------
diff --git a/app/View/Emails/text/user_reset_pwd.ctp b/app/View/Emails/text/user_reset_pwd.ctp
index d3c73f0..d8b7b93 100755
--- a/app/View/Emails/text/user_reset_pwd.ctp
+++ b/app/View/Emails/text/user_reset_pwd.ctp
@@ -1,17 +1,30 @@
-━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
-このメールは、PICT CODE から配信されています
-━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+このメールは、PICT CODE から自動配信されています
+━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 
+PictCodeのユーザーパスワードを再発行します。
+下記のURLをクリックし、新しいパスワードを入力して再設定を行ってください。
 
-パスワードを変更する場合には下記リンクからお願いします。
+▼パスワード再設定用URL
+URL：
+<?php echo $comment;?>
 
-お名前：<?php echo $name;?>
+PictCodeに関してご不明な点、ご質問などのお問い合わせは、こちらよりお願いします。
 
-お問い合わせ内容：
+▼お問い合わせフォーム
+URL：http://itkids.club/top/contact
+
+
+尚、このメールは、PictCodeにのユーザーパスワードの再発行を申請された方に自動配信されています。
+本内容に覚えがなくメールを受け取られた方は、お問い合わせフォーム、もしくは下記の連絡先までご連絡ください。
 
-<?php echo $comment;?>
 
-━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
-PICT CODE カスタマーサポートセンター
-メールでのお問い合わせ： info@itkids.com
-━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+■PictCode管理会社 --------------------------------------------------------
+ IT KiDS株式会社 お問い合わせ係
+  〒184-0001
+  東京都小金井市関野町1丁目10番9号 101
+  URL : http://itkids.club
+  E-Mail : office@itkids.club
+------------------------------------------------
+Copyright (C) 2016 IT KiDS Inc. All Rights Reserved.
+----------------------------------------------------------------------------
diff --git a/app/View/users/newpwd.ctp b/app/View/users/newpwd.ctp
index 45c308c..54319db 100755
--- a/app/View/users/newpwd.ctp
+++ b/app/View/users/newpwd.ctp
@@ -8,6 +8,7 @@
 			<div id="contents">
 			<hr>
 			<?php echo $this->Form->create('User',array(
+										'type' => 'post',
 										'div' => false,
 										'novalidate' => true,
 										'inputDefaults' => array(
@@ -41,6 +42,12 @@
 
 
 								 //表示されない領域
+								echo $this->Form->input('id',
+									array( 'type' => 'hidden',
+											'label' => 'ニックネーム',
+											'placeholder'=>'ニックネーム',
+										 	'value' => $user['User']['id'],	
+										));
 								echo $this->Form->input('login_id',
 									array( 'type' => 'hidden',
 											'label' => 'ニックネーム',
