JUtility/getToken: Difference between revisions
From Joomla! Documentation
New page: ===Description===
Method to determine a hash for anti-spoofing variable names
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>[[Description:JUtility/getToken|Edit ... |
m preparing for archive only |
||
| (One intermediate revision by the same user not shown) | |||
| Line 2: | Line 2: | ||
Method to determine a hash for anti-spoofing variable names | Method to determine a hash for anti-spoofing variable names | ||
===Syntax=== | ===Syntax=== | ||
| Line 39: | Line 37: | ||
</source> | </source> | ||
===Examples=== | ===Examples=== | ||
=== Code Examples === | |||
<dpl> | <dpl> | ||
noresultsheader=\n | noresultsheader=\n | ||
category=getToken | category=getToken | ||
category=JUtility | category=JUtility | ||
namespace=CodeExample | |||
category=MethodExample | category=MethodExample | ||
include=* | include=* | ||
format= ,,, | format= ,,, | ||
</dpl> | </dpl> | ||
Latest revision as of 02:16, 25 March 2017
Description
Method to determine a hash for anti-spoofing variable names
Syntax
static getToken($forceNew=false)
| Parameter Name | Default Value | Description |
|---|---|---|
| $forceNew | false |
Returns
string Hashed var name
Defined in
libraries/joomla/utilities/utility.php
Importing
jimport( 'joomla.utilities.utility' );
Source Body
public static function getToken($forceNew = false)
{
$session = &JFactory::getSession();
return $session->getFormToken($forceNew);
}
Examples
Code Examples