| @@ 173-187 (lines=15) @@ | ||
| 170 | * |
|
| 171 | * @return \Cake\Http\Response|null |
|
| 172 | */ |
|
| 173 | public function login() |
|
| 174 | { |
|
| 175 | $this->viewBuilder()->setLayout('login'); |
|
| 176 | if ($this->request->is('post')) { |
|
| 177 | $user = $this->Auth->identify(); |
|
| 178 | if ($user !== false) { |
|
| 179 | $this->Auth->setUser($user); |
|
| 180 | return $this->redirect($this->Auth->redirectUrl()); |
|
| 181 | } |
|
| 182 | ||
| 183 | $this->Flash->error(__d('community', 'Login or password is incorrect')); |
|
| 184 | } |
|
| 185 | ||
| 186 | $this->set('page_title', __d('community', 'Authorize profile')); |
|
| 187 | } |
|
| 188 | ||
| 189 | /** |
|
| 190 | * Logout action. |
|
| @@ 101-114 (lines=14) @@ | ||
| 98 | * |
|
| 99 | * @return \Cake\Http\Response|null |
|
| 100 | */ |
|
| 101 | public function login() |
|
| 102 | { |
|
| 103 | if ($this->request->is('post')) { |
|
| 104 | $user = $this->Auth->identify(); |
|
| 105 | if ($user !== false) { |
|
| 106 | $this->Auth->setUser($user); |
|
| 107 | return $this->redirect($this->Auth->redirectUrl()); |
|
| 108 | } |
|
| 109 | ||
| 110 | $this->Flash->error(__d('community', 'Login or password is incorrect')); |
|
| 111 | } |
|
| 112 | ||
| 113 | $this->set('page_title', __d('community', 'Authorize profile')); |
|
| 114 | } |
|
| 115 | ||
| 116 | /** |
|
| 117 | * Logout action. |
|