There’s a handful of stuff in the MODx $_SESSION array... I’m wondering how I might tap that to ensure that a user is logged in with appropriate permissions.
Here are some relevant portions of the $_SESSION array:
Array
(
[usertype] => manager
[mgrShortname] => me
[mgrValidated] => 1
[mgrInternalKey] => 1
[mgrDocgroups] =>
[ip] => 127.0.0.1
[browser] => sf
[browser_version] => 530.19
[groups] => Array
(
[0] => Some Group
[1] => Some other Group
)
[webShortname] => me
[webFullname] => Full Name
[webEmail] => [email protected]
[webValidated] => 1
[webInternalKey] => 1
[webUserGroupNames] =>
[webDocgroups] => Array
(
[0] => 1
)
)
Anyone have some insights/tips/tricks on this? I think I can probably just check the value of webValidated and webDocgroups...