securitytoken.php 379 B

12345678910111213141516
  1. <?php
  2. /**
  3. * CSRF security token view for use with secure forms.
  4. *
  5. * It is still recommended that you use input/form.
  6. *
  7. * @package Elgg
  8. * @subpackage Core
  9. */
  10. $ts = time();
  11. $token = generate_action_token($ts);
  12. echo elgg_view('input/hidden', array('name' => '__elgg_token', 'value' => $token));
  13. echo elgg_view('input/hidden', array('name' => '__elgg_ts', 'value' => $ts));