28, May 2012

Get users level - webmaster forum

 
Webdigity webmaster forums
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  PHP classes @finalwebsites.com  >  Access_user Class (Moderator: Olaf)
Topic: Get users level
« previous next »
Pages: [1] Print

Author Topic: Get users level  (Read 1978 times)
Google dot what?
*
Posts: 2
16 credits
Members referred : 0


« on: Dec 04, 2006, 03:20:12 pm »

Sorry if this has been answered already, but I'm trying show certain parts of a page, depending on a user level.

E.g
a menu, admin (level 10) can view full menu, user (level 1) can only view parts of the menu.

Now I can do the php if, else, bits I just need to known how to access the users level 

help!!
Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #1 on: Dec 04, 2006, 03:55:20 pm »

??

// menu for all
if ($page_protect->access_level > 1) {
  // menu for small group
}

Google dot what?
*
Posts: 2
16 credits
Members referred : 0


« Reply #2 on: Dec 04, 2006, 04:20:17 pm »

OK I guess I'm not as smart as I though I was, done this as a test

<?php
if ($page_protect->access_level > 1) {
  // menu for small groupsdsd
  echo "hello test";
}
?>

and I get back
Notice:  Undefined property: access_level in ...etc
Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #3 on: Dec 04, 2006, 04:25:13 pm »

OK I guess I'm not as smart as I though I was, done this as a test

<?php
if ($page_protect->access_level > 1) {
  // menu for small groupsdsd
  echo "hello test";
}
?>

and I get back
Notice:  Undefined property: access_level in ...etc


of course you have to create an object (check the examples and maybe the php manual how to handle classes and objects)

Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=5026
Tags : php Bookmark this thread : Digg Del.icio.us Dzone more....

Pages: [1] Print 
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  PHP classes @finalwebsites.com  >  Access_user Class (Moderator: Olaf)
Topic: Get users level
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 28, 2012, 06:23:18 pm





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!






Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2012 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.