You are not enjoying the benefits offered by registering. To register click here...
  
Forums | Prefs | Your Messages | Members | Recent | Search
Quick Search


Advanced Search
| Calendar | Doc | Dev' Blog! |
Chat (Alpha Version)

Guest, do not forget to login ( Register )
 Top > Forums > This Software > Support, FAQ, How-to's
 About $USER->

Skin Selection:
 (1 pages) 1  
harmor


Story Teller
Group: Developers
Posts: 127
Reputation: 3


Posted on Jul 12, 2006, 8:26 pm by harmor
About $USER->
$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 pm
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.
 
Top

harmor


Story Teller
Group: Developers
Posts: 127
Reputation: 3


Posted on Jul 12, 2006, 8:45 pm by harmor
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:
  1. function isAdmin()
  2. {
  3. return ($this->admin==1);
  4. }


After Add
php Code:
  1.  
  2. function isMainAdmin()
  3. {
  4. return ($this->id == 1);
  5. }
  6.  


Now in your code you can use
php Code:
  1.  
  2. if($USER->isMainAdmin())
  3. {
  4.     //code only for main admin here
  5. }


Last edit by harmor on Dec 31, 1969, 7:00 pm
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.
 
Top

Jasper

Public Speaker
Group: Testers
Posts: 561
Reputation: 10


Posted on Jul 12, 2006, 9:33 pm by Jasper
I can see you'll be a great addition to NextBBS. Keep up the good work
doesn't come here often, cause he has no free time ;_;
 
Top

harmor


Story Teller
Group: Developers
Posts: 127
Reputation: 3


Posted on Jul 12, 2006, 9:36 pm by harmor
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.
 
Top

harmor


Story Teller
Group: Developers
Posts: 127
Reputation: 3


Posted on Jul 12, 2006, 10:18 pm by harmor
Delete This


as
edgb
esg
eswd
ge
swg
ews

Last edit by harmor on Dec 31, 1969, 7:00 pm
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.
 
Top

chris

The Culprit
Group: Admins
Posts: 1,516
Reputation: 38


Posted on Jul 13, 2006, 4:48 am by chris
Oh, there is some activity and even bound to be more...Zoints.com endorses NBBS and that's a very very good thing.

 
Top

 (1 pages) 1 - Flat Mode | Threaded Mode  
Quick Jump:

         
Page generated in 0.04 seconds (Queries: 0.00) - Cpu: 0.27
Total DB [adodb:mysql] queries: 15
Total Strings Translated: 15
Powered by NextBBS SE v0.4.5 - Copyright © 2007 CFR & The NextBBS Team
Chatbox powered by smiletag