PDA

View Full Version : Problems with $usergroupcache


Ocean
Wed 14th Apr '04, 3:35pm
Hi! I'm using a code mod designed to put each User's UserGroup in the Postbit.

Originally, this was accomplished by


$post[displaygrouptitle]

However, doing it this way accesses the "displaygroupid" field, instead of the "usergroupid" field in the "User" Table.


As a fix, I was told to replace the above code with this:



$usergroupcache[$post[usergroupid]][title]



However, doing that comes up with a Parse Error:

"Parse error: parse error, unexpected '[', expecting ']' in C:\WebSite\forums\includes\adminfunctions_template .php(3037) : eval()'d code on line 74"


Can anyone help me figure out where the problem is?

The whole reason for this is that when I mass-moved a bunch of users to a different UserGroup - their displaygroupid values remained as the old Group. I don't know if that was supposed to happen or not - but I figure that by pulling from the "usergroupid" field, I'll always get the most accurate results.