@@ 16-23 (lines=8) @@ | ||
13 | class UserController extends Base |
|
14 | { |
|
15 | ||
16 | public function loginForm(ServerRequestInterface $request, ResponseInterface $response, array $args) |
|
17 | { |
|
18 | $template = new Template('login.twig'); |
|
19 | $template->title = 'Log in'; |
|
20 | $template->name = $this->getQueryParam($request, 'name'); |
|
21 | $response->getBody()->write($template->render()); |
|
22 | return $response; |
|
23 | } |
|
24 | ||
25 | public function login(ServerRequestInterface $request, ResponseInterface $response, array $args) |
|
26 | { |
|
@@ 87-94 (lines=8) @@ | ||
84 | return new RedirectResponse($this->config->baseUrl() . '/login?name=' . $user->getName()); |
|
85 | } |
|
86 | ||
87 | public function remindForm(ServerRequestInterface $request, ResponseInterface $response, array $args) |
|
88 | { |
|
89 | $template = new Template('remind.twig'); |
|
90 | $template->title = 'Remind'; |
|
91 | $template->name = $this->getBodyParam($request, 'name'); |
|
92 | $response->getBody()->write($template->render()); |
|
93 | return $response; |
|
94 | } |
|
95 | ||
96 | public function remind(ServerRequestInterface $request, ResponseInterface $response, array $args) |
|
97 | { |
|
@@ 158-164 (lines=7) @@ | ||
155 | return new RedirectResponse($this->config->baseUrl() . "/login?name=" . $user->getName()); |
|
156 | } |
|
157 | ||
158 | public function profile(ServerRequestInterface $request, ResponseInterface $response, array $args) |
|
159 | { |
|
160 | $template = new Template('profile.twig'); |
|
161 | $template->title = 'Profile'; |
|
162 | $response->getBody()->write($template->render()); |
|
163 | return $response; |
|
164 | } |
|
165 | } |
|
166 |