function fp_token
Search API
7.x misc.inc | fp_token() |
6.x misc.inc | fp_token() |
4.x misc.inc | fp_token() |
5.x misc.inc | fp_token() |
Returns back the site's "token", which is a simply md5 of some randomness. It is used primarily with forms, to ensure against cross-site forgeries. The site's token gets saved to the variables table, for later use. The idea is that every installation of FlightPath has a semi-unique token.
7 calls to fp_token()
- advise_display_view in modules/
advise/ advise.module - This is the page which actually displays the "view" for the user to see their advising session, or for an advisor to advise them.
- advise_init_screen in modules/
advise/ advise.module - AdvisingScreen::draw_pie_chart_box in classes/
AdvisingScreen.php - This function is used to draw an individual pie chart box. It accepts values of top/bottom in order to come up with a percentage.
- fp_render_form in includes/
render.inc - Render the form array from the callback to the screen, and set the form to save itself in our default submit handler. Valid form_types are: "system_settings" => values automatically saved to variables table. "normal" or BLANK…
- system_handle_form_submit in modules/
system/ system.module - Intercepts form submissions from forms built with the form API.
File
- includes/
misc.inc, line 1638 - This file contains misc functions for FlightPath
Code
function fp_token() {
$site_token = variable_get("site_token", "");
if ($site_token == "") {
$site_token = md5("" . time() . rand(1, 9999));
variable_set("site_token", $site_token);
}
return $site_token;
}