We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7455
    • 2,204 Posts
    just check the db if the new registerd user has a number other that 0 (and should have a - in frond like -10) then it works.
      follow me on twitter: @dimmy01
      • 25551 ☆ A M B ☆
      • 1,231 Posts
      It does indeed... it says -39

      is having the "-" a problem at all?
        Ross Sivills - MD AugmentBLU Edinburgh, Scotland UK
        AugmentBLU - MODX Partner

        BLUcart - MODX Revolution E-Commerce & Shopping Cart
        • 25551 ☆ A M B ☆
        • 1,231 Posts
        Is there a way I can create a menu so the user can see links only to their pages?


          Ross Sivills - MD AugmentBLU Edinburgh, Scotland UK
          AugmentBLU - MODX Partner

          BLUcart - MODX Revolution E-Commerce & Shopping Cart
          • 7455
          • 2,204 Posts
          Quote from: rossco at Jun 04, 2008, 05:21 AM

          It does indeed... it says -39

          is having the "-" a problem at all?

          nope because its a webuser and not a manager user it needs to be a negative number so it can never be t he same number as a manager user.

          Quote from: rossco at Jun 07, 2008, 02:34 PM

          Is there a way I can create a menu so the user can see links only to their pages?

          I I remember you create folder with some pages for each usewr?
          then you could use wayfinder like [!wayfinder? &startId=`[*parent*]`!]
          and then make sure theat the main folder for that client is set to not be in menu (c ould even be unpublished.)
          theb the loginID can be set to one of the pages inside this "hidden" folder.
          that way others wil not see those pages in there menu and even if t he id is known that the snippet I made will keep others from viewing those pages.

          Hope this helps,

          Dimmy
            follow me on twitter: @dimmy01
            • 25551 ☆ A M B ☆
            • 1,231 Posts
            Yeah that was the idea I had.... how ever if you use loginPE and set a landing page for a successful login, it would need to be a page for all.... how would the user know that they have their own pages to navigate to if they are signed in but browsing an area that is out-with their created pages?

            I already have this wayfinder call created on each of the auto created docs so the user had a navigational system when at the main pages directory... it’s just a matter of creating a menu out of this area so they know that they have their own private pages

            [!Wayfinder? &startId=`[*parent*]` &ignoreHidden=`1` &level=`2`!]

            This works fine if used in the parent or child docs that the user created on signup... Hope this makes sense!

            Thanks Ross
              Ross Sivills - MD AugmentBLU Edinburgh, Scotland UK
              AugmentBLU - MODX Partner

              BLUcart - MODX Revolution E-Commerce & Shopping Cart
              • 7455
              • 2,204 Posts
              you could use an extra snippet that creates a link to the landingpage of that user
                follow me on twitter: @dimmy01
                • 25551 ☆ A M B ☆
                • 1,231 Posts
                Without much knowledge... I’m guessing something along the lines of your redirect script would be what I need?

                <?php
                if($_SESSION["usertype"] == "manager") {$manager = "1";}
                $wuid  = "-".$modx->getLoginUserID();
                $owner =  $modx->documentObject['createdby'];
                if($wuid == $owner || $manager == "1"){
                return;
                }else{
                $modx->sendRedirect($modx->makeUrl($modx->config['site_start']));
                }
                ?>
                  Ross Sivills - MD AugmentBLU Edinburgh, Scotland UK
                  AugmentBLU - MODX Partner

                  BLUcart - MODX Revolution E-Commerce & Shopping Cart
                  • 7455
                  • 2,204 Posts
                  its much easier:
                  <?php
                  if($modx->config[login_home]){
                  return "<a href='[~".$modx->config[login_home]."~]' title='to your own page'>personal homepage</a>";
                  }
                  ?>
                  


                  this will generate a link to the personal homepage when a webuser is logged in
                    follow me on twitter: @dimmy01
                    • 25551 ☆ A M B ☆
                    • 1,231 Posts
                    I tried making your code in to a snippet and put [[homepage]] where my menu is but nothing appeared... I tried using it as a plugin with OnWebLogin system event but that didn’t work either.
                      Ross Sivills - MD AugmentBLU Edinburgh, Scotland UK
                      AugmentBLU - MODX Partner

                      BLUcart - MODX Revolution E-Commerce & Shopping Cart
                      • 7455
                      • 2,204 Posts
                      the snippet only shows something when you are logged in as a webuser AND when you have a loggedinhomeid set in webuser settings.
                      I tested it myself and it worked

                      its a snippet
                        follow me on twitter: @dimmy01