@@ 180-194 (lines=15) @@ | ||
177 | * |
|
178 | * @throws \Aura\Intl\Exception |
|
179 | */ |
|
180 | public function login() |
|
181 | { |
|
182 | $this->viewBuilder()->setLayout('login'); |
|
183 | if ($this->request->is('post')) { |
|
184 | $user = $this->Auth->identify(); |
|
185 | if ($user !== false) { |
|
186 | $this->Auth->setUser($user); |
|
187 | return $this->redirect($this->Auth->redirectUrl()); |
|
188 | } |
|
189 | ||
190 | $this->Flash->error(__d('community', 'Login or password is incorrect')); |
|
191 | } |
|
192 | ||
193 | $this->set('page_title', __d('community', 'Authorize profile')); |
|
194 | } |
|
195 | ||
196 | /** |
|
197 | * Logout action. |
@@ 107-120 (lines=14) @@ | ||
104 | * |
|
105 | * @throws \Aura\Intl\Exception |
|
106 | */ |
|
107 | public function login() |
|
108 | { |
|
109 | if ($this->request->is('post')) { |
|
110 | $user = $this->Auth->identify(); |
|
111 | if ($user !== false) { |
|
112 | $this->Auth->setUser($user); |
|
113 | return $this->redirect($this->Auth->redirectUrl()); |
|
114 | } |
|
115 | ||
116 | $this->Flash->error(__d('community', 'Login or password is incorrect')); |
|
117 | } |
|
118 | ||
119 | $this->set('page_title', __d('community', 'Authorize profile')); |
|
120 | } |
|
121 | ||
122 | /** |
|
123 | * Logout action. |