public function onLogoutSuccess(Request $request) { $user = $this->security->getToken()->getUser(); //add code to handle $user here //... $response = RedirectResponse($this->router->generate('login')); return $response; }
} if (isset($_POST['fleetLink']) && isset($_POST['name'])) { $matches; if (preg_match('/gang:(?<id>\\d+)/', GetPost('fleetLink'), $matches)) { $a = Alliance::EnsureAlliance($brow->AllianceId(), $brow->AllianceName()); $f = new Fleet(); $f->Id = $matches['id']; $f->AllianceId = $a->Id; $f->Name = GetPost('name'); $f->Added = time(); if ($f->Validate()) { $f->Save(); // this seems like a good place to delete old fleets Fleet::DeleteOldFleets(); DataManager::GetInstance()->CloseConnection(); RedirectResponse('links.php'); } } } ?> <html> <head> <title>Fleet Links - Add Fleet</title> </head> <body> <h1><a href="index.php">Fleet Links</a></h1> <h2>Add Fleet</h2> <form action="AddFleet.php" method="post">
public function language($request) { if (Session::isActive()) { $data['currentPageTitle'] = "Paramètre de langues"; $data['settings'] = Session::get()->getSettings(); $data['current'] = 'language'; $data['avaiable_languages'] = Translator::getLanguagesList(); $data['lang_setting'] = Session::get()->getLanguageSetting(); return new ViewResponse('account/language', $data); } else { return RedirectResponse(WEBROOT . 'login'); } }