$USER->name This will get the username of the person browsing. $USER->group This will return the usergroup the user is in $USER->id This will return the userid of the person browsing $USER->posts Will return the number of posts the person browsing has. $USER->isAdmin(); Check if the person browsing is an administrator $USER->isGuest(); Checks if person is a guest $USER->isMember(); Checks if person is a member $USER->getIP(); Gets the IP Address of person browsing $USER->isModerator(); Checks if person is a moderator
More to come....
Last edit by harmor on Dec 31, 1969, 7:00 pmXen Web Hosting
Offering ad-free hosting with features such as, cpanel, fantastico, PHP and MySQL support, and more
-------------------------------------------------------------------------------------------------------
Chris
Let's hang on to Harmor, it's not everyday that you find people who walk the walk, not just talk the talk.
I made my own function that checks if the person is the main admin (the person who set up the board).
Open user.php
Find
php Code:
function isAdmin()
{
return($this->admin==1);
}
After Add
php Code:
function isMainAdmin()
{
return($this->id == 1);
}
Now in your code you can use
php Code:
if($USER->isMainAdmin())
{
//code only for main admin here
}
Last edit by harmor on Dec 31, 1969, 7:00 pmXen Web Hosting
Offering ad-free hosting with features such as, cpanel, fantastico, PHP and MySQL support, and more
-------------------------------------------------------------------------------------------------------
Chris
Let's hang on to Harmor, it's not everyday that you find people who walk the walk, not just talk the talk.
Activity better pick up or I'll lose interest in this software.
Xen Web Hosting
Offering ad-free hosting with features such as, cpanel, fantastico, PHP and MySQL support, and more
-------------------------------------------------------------------------------------------------------
Chris
Let's hang on to Harmor, it's not everyday that you find people who walk the walk, not just talk the talk.
Last edit by harmor on Dec 31, 1969, 7:00 pmXen Web Hosting
Offering ad-free hosting with features such as, cpanel, fantastico, PHP and MySQL support, and more
-------------------------------------------------------------------------------------------------------
Chris
Let's hang on to Harmor, it's not everyday that you find people who walk the walk, not just talk the talk.