Use atkGetUser() outside nodes/modules: Difference between revisions
Appearance
No edit summary |
mNo edit summary |
||
| Line 16: | Line 16: | ||
// If you want to do the same thing as me you will need an instance of the atkDb | // If you want to do the same thing as me you will need an instance of the atkDb | ||
$db = | $db =</syntaxhighlight> | ||
</syntaxhighlight> | |||
Revision as of 19:59, 9 July 2007
|
ATK Howto: Use atkGetUser() outside nodes/modules
|
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.
The call to atksecure() also makes sure that nobody can access the file without logging in first.
$config_atkroot = "./";
include_once("atk.inc");
atksession();
atksecure();
// 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 =