API16

JUtility/getToken: Difference between revisions

From Joomla! Documentation

Doxiki (talk | contribs)
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


<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>[[Description:JUtility/getToken|Edit Descripton]]<nowiki>]</nowiki>
</span>


{{Description:JUtility/getToken}}
 
 


===Syntax===
===Syntax===
Line 39: Line 37:
</source>
</source>


<span class="editsection" style="font-size:76%;">
 
<nowiki>[</nowiki>[[SeeAlso:JUtility/getToken|Edit See Also]]<nowiki>]</nowiki>
 
</span>
{{SeeAlso:JUtility/getToken}}


===Examples===
===Examples===
<CodeExamplesForm />
=== Code Examples ===
<dpl>
<dpl>
  noresultsheader=\n
  noresultsheader=\n
  category=getToken
  category=getToken
  category=JUtility
  category=JUtility
  category=CodeExample
  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