News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

id_group and group_id errors

Started by kaamaru, July 07, 2010, 11:12:10 AM

Previous topic - Next topic

kaamaru

If I use the code:

if (in_array($user_settings['id_group'], array(1,2))) 

or:

if($context['user']['is_admin'] || $context['user']['is_owner'] || $context['user']['group_id'] == 2)

I get undefined errors in the error log. What should I do?

Undefined index: id_group

Undefined index: group_id

Joker™

Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

kaamaru


Joker™

Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

lucas-ruroken

mmm you can use global $user_info;

$user_info['groups'][0]
Adk Portal 3.1 is coming....

Design your universe!

Advertisement: