public function loginAction() { // get the login error if there is one if ($this->get('request')->attributes->has(SecurityContext::AUTHENTICATION_ERROR)) { $error = $this->get('request')->attributes->get(SecurityContext::AUTHENTICATION_ERROR); } else { $error = $this->get('request')->getSession()->get(SecurityContext::AUTHENTICATION_ERROR); } // last username entered by the user 'last_username' => $this->get('request')->getSession()->get(SecurityContext::LAST_USERNAME), 'error' => $error, )); }
Działą tworzy sesje,ale jedna zagadka, zawsze jak wejdę na stronę logowania jest ostatni błąd, czyli np źle wpisałem hasło, wchodzę jeszcze raz wpisujac od nowa url ,błąd tkwi nadal, idize to jakoś "naprawić"?