Jump to content

Use atkGetUser() outside nodes/modules: Difference between revisions

From NusaATK
This HowTo describes how you can use getUser() outside a node or a module
 
No edit summary
Line 1: Line 1:
{{howto|Advanced|[[Meinaart van Straalen]] <meinaart@zicht.nl>}}
{{howto|Advanced|[[Meinaart van Straalen]] <meinaart@zicht.nl>}}


This HowTo describes how you can use getUser() outside a node or a module. I used this, for example, to display some information about the user on the welcome.php page.
This Howto describes how you can use getUser() outside a node or a module. I used this, for example, to display some information about the user on the welcome.php page.


<pre>
<pre>
Line 15: Line 15:
</pre>
</pre>


Very short HowTo but very handy if you needed this. Took me some time to figure it out. I hope it helps.
Very short Howto but very handy if you needed this. Took me some time to figure it out. I hope it helps.

Revision as of 08:56, 13 July 2006

ATK Howto: Use atkGetUser() outside nodes/modules

Complexity: Advanced
Author: Meinaart van Straalen <meinaart@zicht.nl>

List of other Howto's

This Howto describes how you can use getUser() outside a node or a module. I used this, for example, to display some information about the user on the welcome.php page.

$config_atkroot = "./";
include_once("atk.inc");
include_once("atk/skel/include.php");

// Now you can use getUser()
$user = getUser();

// If you want to do the same thing as me you will need an instance of the atkDb
$db = &atkGetDb();

Very short Howto but very handy if you needed this. Took me some time to figure it out. I hope it helps.