form_token

Versions
4.6
form_token()

Generate a form token based on the session and the private key to defend against cross site request forgeries.

Related topics

▾ 3 functions call form_token()

comment_render in modules/comment.module
form in includes/common.inc
Generate a form from a set of form elements.
xtemplate_page in themes/engines/xtemplate/xtemplate.engine

Code

includes/common.inc, line 981

<?php
function form_token() { 
  return form_hidden('token', drupal_get_token());
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.