We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14883 ☆ A M B ☆
    • 450 Posts
    Quote from: BobRay at Aug 06, 2013, 02:05 AM
    This might do it:

    $currentUser = $modx->getAuthenticatedUser('mgr');
    
    if ($currentUser) {
    
        if ($currentUser->isMember('Administrator')) {
             /* do something here */
        }
    
    }
    

    /quote]

    Thanks!


    Quote from: sottwell at Aug 06, 2013, 04:52 AM
    By "almost everything is created on the fly in modExt" we mean it's all done with AJAX from the browser. If you do a view source on the page in your browser, you'll see it doesn't have a lot in it. In fact, once you get past the main menu, all you'll see on a resource editing page is
    <div id="modAB"></div>
    <div id="modx-leftbar"></div>
    <div id="modx-content">
        <div id="modx-panel-holder"></div>
        <div id="modx-panel-resource-div"></div>
        <div id="modx-resource-tvs-div"></div>
    </div>

    Yeah, I know it is going to be a different kind of animal than I'm used to. My rough gameplan was this: 1) Get a list of resource IDs to hide (stored in an AJAX string in a user setting). 2) have the plugin generate some extJS code that hides the IDs of those resources (based on the ID pattern I can see that they have using Firebug). 3) inject that extJS code into the head of the document using regClientStartupScript.

    Seems like it should work, doesn't it? Unless #3 doesn't work in the Manager environment for some reason.