We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

SuperAdmin group id constant?

Development and Programming

John Morton's avatar
John Morton
84 posts
14 years ago
John Morton's avatar John Morton

I’m working on a control panel that I want to show SuperAdmin’s a full set of features but all other member levels a limited set.

I’m testing against $this->EE->session->userdata[‘group_id’] and when the group ID === ‘1’, I assume the user is a SuperAdmin. This works, but it feels wrong to me. I can’t guarantee that group_id of 1 is always the SuperAdmin, I think.

Can anyone point me to a better solution?

       
Focus Lab Dev Team's avatar
Focus Lab Dev Team
1,129 posts
14 years ago
Focus Lab Dev Team's avatar Focus Lab Dev Team

As far as I know there isn’t a better solution. I can say, though, that in my time using EE I’ve never come across an instance where someone changed the ID of the super admin group. Not sure if that’s comforting at all or not 😊

       
John Morton's avatar
John Morton
84 posts
14 years ago
John Morton's avatar John Morton

Good to hear. Thanks for the response. I was having one of those moments where I knew it must be one of those things I must have overlooked in the docs somewhere.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.