$fbaccount = new fbaccount(); $fbapps = new FbApps(); // Switch facebook account request if (Input::Get("switchFbAccount")) { if ($fbaccount->exists(Input::Get("switchFbAccount"))) { $user->UpdateOptions(array('default_Fb_Account' => Input::Get("switchFbAccount"))); if (!httpReferer()) { Redirect::To("settings.php"); } Redirect::To(httpReferer()); } } // Delete facebook account if (Input::get("action", "GET") == "deletefbaccount" && Input::get("id", "GET")) { try { $fbaccount->delete(Input::get("id", "GET")); Session::Flash("settings", "success", lang("FB_ACCOUNT_SUCCESS_DELETED"), true); } catch (Exception $ex) { Session::Flash("settings", "danger", $ex->GetMessage(), true); } Redirect::To("settings.php#tab-fbAccounts"); } // Delete facebook app if (Input::get("action", "GET") == "deletefbapp" && Input::get("id", "GET")) { try { $fb->DeleteApp(Input::get("id", "GET")); } catch (Exception $ex) { Session::Flash("settings", "danger", $ex->GetMessage(), true); } Redirect::To("settings.php#tab-fbApps"); }