We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 13331
    • 67 Posts
    Hi,

    I’m a soldier doing a private site for my team where we should be able to post pictures, manage our schedule and discuss topics among other things.

    As some of the things we will be discussing and posting will be confidential I’m in need of a front-end login.

    So my question is.. when I have a complete site ready to launch, how do I change the main-page to a login box like the manager login and then afterwards show the actual site?
      • 22303 MODX Staff
      • 10,725 Posts
      Make one page public with nothing but the WebLogin snippet on it. Assign this as your error page and unauthorized page in the configuration settings, but make your private landing page be your site_start. Protect the landing page, and the rest of your private pages with a Document Group that your web users will have access to through their group memberships. Configure your WebLogin snippet to redirect to the secure landing page on successful login (e.g. &loginhomeid=`2`) and you should be set.
        • 32982
        • 674 Posts
        another option...
        create a template for the start page whith the weblogin snippet only...
        before create a plugin onwebpageprerender
        telling...
        $id_login= 22;//id del webloginsnippet
        $webgroups=array("soilders1","soilders2");//name of the groups of soilders could be one
        if ($modx->ismemberofwebgroup($webgroups)&&$modx->documentIdentifier!=$id_login){}else{
        $modx->sendRedirect($modx->makeUrl($id_login));
        }
        hi
          Jabiertxof (formerly XYZVISUAL)
          My bussines: http://marker.es
          https://www.youtube.com/user/jabiertxof/videos