#1
I can see in the docs that this will work to check for a valid token if they are a user with level 3 or 4:



But that is not practical when I am using the members module.

How can I use the Members module to provide access to a module for users with trongate_user_levels = 3 OR trongate_user_levels = 4?
#2
Hello,
function _make_sure_allowed_3() {
// Check if the user is logged in
$this->module('trongate_tokens');
$token = $this->trongate_tokens->_attempt_get_valid_token();
$member_obj = $this->_get_member_obj($token);
use an if statement to determine if there allowed.
trongate_user_id == 3
This produces the following
{
"trongate_user_code":"dytcGEc47h6VCmYmrJLwH5CPx8GMWcKa",
"user_level_id":"1",
"user_level":"admin",
"token":"r8Ex_25FoYFSsrJTn3wezn6wzW8XRLkf",
"trongate_user_id":"1",
"expiry_date":"1629508409"
}

Dan
#3
Thank you for posting a solution Dan.

My revised code below worked and was actually very simple.

Here is how I provide access to both the admin and the user level 3 (manager) to pages within the managers module:

#4
Glad I could help
Dan