Welcome, Guest. Please login or register.
Did you miss your activation email?
May 26, 2012, 06:18:44 AM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
155533 Posts in 21713 Topics by 7739 Members
Latest Member: audillino
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: $_SESSION['GROUP_NAME'] variable got a bug?  (Read 464 times)
kiwipete

Offline Offline

Posts: 8


« on: June 03, 2010, 10:53:42 AM »

I am trying to use this variable in a code section, but it doesn't return the group name properly.

Here is some test code:
Code:
echo $_SESSION['GROUP_ID'];
echo "<BR>";
print_r($_SESSION['GROUP_ID']);
echo "<BR>";
echo $_SESSION['GROUP_NAME'];
echo "<BR>";
print_r($_SESSION['GROUP_NAME']);
echo "<BR>";
echo $_SESSION['USERNAME'];
echo "<BR>";
print_r($_SESSION['USERNAME']);

This returns:

1
1

Array
Array ( [1] => Administrators )

admin
admin

Anybody got any ideas on this one?

Cheers

Peter
Logged
DarkViper
Development Team
*****
Offline Offline

Posts: 1252


« Reply #1 on: June 03, 2010, 11:27:28 AM »

using Session-Vars is deprecated
use the methods and properties of the wb  or admin object instead.

group_id is deprecated also. It will be removed from WB2.9
you can use 'groups_id' witch contains a list of group-ids where the current user is a assigned to.

It is very helpfull, to explore the functions of '/framework/class.wb.php'
Logged

Anleitungen lesen und selber nachdenken ist anstrengend...  Da lass ich doch lieber andere für mich denken...

In 1984:  Nineteen Eighty-Four is a unrealistic utopia!!
In 2012:  Nineteen Eighty-Four is a little piece only of our reality!!
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!