Actions

API17

Difference between revisions of "JUser::getInstance"

From Joomla! Documentation

(Layout updates)
(Updated to r1448:247ba8d88526)
Line 8: Line 8:
 
<nowiki>[</nowiki>[[Description:JUser::getInstance|Edit Descripton]]<nowiki>]</nowiki>
 
<nowiki>[</nowiki>[[Description:JUser::getInstance|Edit Descripton]]<nowiki>]</nowiki>
 
</span>
 
</span>
===Since===
 
{{JVer|11.1 }}
 
===Synopsis===
 
 
<source lang="php">
 
<source lang="php">
public static JUser::getInstance ($identifier=0)
+
public static function getInstance ($identifier=0)
 
</source>
 
</source>
 
{| class="wikitable"
 
{| class="wikitable"
Line 27: Line 24:
 
|-
 
|-
 
|}
 
|}
===Returns===
+
* '''Returns''' The User object.
The User object.
+
* '''Defined''' on line 188 of libraries/joomla/user/user.php
===Defined in===
+
* '''Since''' {{JVer|11.1 }}
libraries/joomla/user/user.php (line 188)
+
* '''Referenced by'''
* see source code in [[jplatform:user/user.php#cl-188|BitBucket]]
+
** [[JUserHelper::activateUser/11.1|JUserHelper::activateUser]]
===Referenced by===
+
** [[JFactory::getUser/11.1|JFactory::getUser]]
* [[JUserHelper::activateUser/11.1|JUserHelper::activateUser]]
+
** [[JUserHelper::getUserGroups/11.1|JUserHelper::getUserGroups]]
* [[JFactory::getUser/11.1|JFactory::getUser]]
+
** [[JUserHelper::removeUserFromGroup/11.1|JUserHelper::removeUserFromGroup]]
* [[JUserHelper::getUserGroups/11.1|JUserHelper::getUserGroups]]
+
** [[JUserHelper::setUserGroups/11.1|JUserHelper::setUserGroups]]
* [[JUserHelper::removeUserFromGroup/11.1|JUserHelper::removeUserFromGroup]]
+
* [[JUserHelper::setUserGroups/11.1|JUserHelper::setUserGroups]]
+
 
===See also===
 
===See also===
 +
* {{JVer|11.1}} '''JUser::getInstance source code''' on [[jplatform:user/user.php#cl-180|BitBucket]]
 +
* {{JVer|11.1}} Class [[JUser/11.1|JUser]]
 +
* {{JVer|11.1}} Subpackage [[Subpackage_User/11.1|User]]
 +
* [[JUser::getInstance|Other versions of JUser::getInstance]]
 +
{{SeeAlso:JUser::getInstance}}
 
<span class="editsection" style="font-size:76%;">
 
<span class="editsection" style="font-size:76%;">
 
<nowiki>[</nowiki>[[SeeAlso:JUser::getInstance|Edit See Also]]<nowiki>]</nowiki>
 
<nowiki>[</nowiki>[[SeeAlso:JUser::getInstance|Edit See Also]]<nowiki>]</nowiki>
 
</span>
 
</span>
* [[JUser/11.1|JUser]]
+
===User contributed notes===
* [[JUser::getInstance|Other versions of this method]]
+
{{SeeAlso:JUser::getInstance}}
+
===Examples===
+
 
<CodeExamplesForm />
 
<CodeExamplesForm />
 
<dpl>
 
<dpl>
Line 53: Line 50:
 
category=MethodExample
 
category=MethodExample
 
include=*
 
include=*
 +
namespace=CodeExample
 
format= ,,,
 
format= ,,,
 
</dpl>
 
</dpl>
 
<noinclude>[[Category:JUser]][[Category:JUser::getInstance]]</noinclude>
 
<noinclude>[[Category:JUser]][[Category:JUser::getInstance]]</noinclude>

Revision as of 21:55, 27 April 2011

Replacement filing cabinet.png
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.

Joomla 11.1 JUser::getInstance

Description

Returns the global User object, only creating it if it doesn't already exist.

Description:JUser::getInstance [Edit Descripton]

public static function getInstance ($identifier=0)
Parameter Type Default Description
$identifier int 0 The user to load - Can be an integer or string - If string, it is converted to ID automatically.

See also

SeeAlso:JUser::getInstance [Edit See Also]

User contributed notes

<CodeExamplesForm />