リビジョン 410c42e5
| app/Controller/UsersController.php | ||
|---|---|---|
| 199 | 199 | */ | 
| 200 | 200 | 	public function login() {
 | 
| 201 | 201 | //var_dump(Security::hash( "123", 'blowfish')); | 
| 202 | 		if($this->Auth->user()){
 | |
| 202 | 		if($this->register->user()){
 | |
| 203 | 203 | $this->redirect($this->Auth->redirectUrl()); | 
| 204 | 204 | } | 
| 205 | 205 | 		if ($this->request->is('post')) {
 | 
| 206 | 			if ($this->Auth->login()) {
 | |
| 206 | 			if ($this->register->login()) {
 | |
| 207 | 207 | 				$this->redirect('/Users/login_top');                          
 | 
| 208 | 208 | 			} else {
 | 
| 209 | 209 | 				$this->Flash->error(__('error'));
 | 
| ... | ... | |
| 219 | 219 | * @return void | 
| 220 | 220 | */ | 
| 221 | 221 | 	public function logout() {
 | 
| 222 | 	    $this->redirect($this->Auth->logout());
 | |
| 222 | 	    $this->redirect($this->register->logout());
 | |
| 223 | 223 | } | 
| 224 | 224 |  | 
| 225 | 225 |  | 
| app/View/users/login.ctp | ||
|---|---|---|
| 41 | 41 | </section> | 
| 42 | 42 | <section class="button_area01"> | 
| 43 | 43 | <a href="/top/index"><p class="button btn_back02"></p></a> | 
| 44 |                 <?php  echo $this->Form->submit('',array('class'=>'button btn_check01')); ?>
 | |
| 44 |                 <?php  echo $this->Form->submit('',array('class'=>'button btn_login')); ?>
 | |
| 45 | 45 | <?php echo $this->Form->end(); ?> | 
| 46 | 46 | </section> | 
| 47 | 47 | </article> | 
他の形式にエクスポート: Unified diff