src/Auth/AuthModel.php
public function getRoleAndUserFromToken($token) {
        $sql = 'SELECT
                    user.username,
                    user.id_user,
                    role.name,
                    role.id_role,
                    role.id_parent,
                    NOW() AS db_date,
                    token.expire
                FROM
                    role
                        INNER JOIN
                    user ON user.id_role = role.id_role
                        INNER JOIN
                    token ON user.id_user = token.id_user
                WHERE token.token="'.$token.'"
                 ';
        $role = $this->select($sql);
        if(is_array($role) && count($role)>0) {
            return $role[0];
        } else {
            return false;
        }
    }
public function getRoleAndUserFromToken($token) {
        $sql = 'SELECT
                    user.username,
                    user.id_user,
                    role.name,
                    role.id_role,
                    role.id_parent,
                    NOW() AS db_date,
                    token.expire
                FROM
                    role
                        INNER JOIN
                    user ON user.id_role = role.id_role
                        INNER JOIN
                    token ON user.id_user = token.id_user
                WHERE token.token="'.$token.'"
                 ';
        $role = $this->select($sql);
        if(is_array($role) && count($role)>0) {
            return $role[0];
        } else {
            return false;
        }
    }
Return the role and user attributes from the given token.

@param string $token
@return boolean