We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 31037
    • 358 Posts
    Great work! smiley

    Will test this version asap!

    Thanks for this great snippet!
      • 6726
      • 7,075 Posts
      Awesome, off to downloading !
        .: COO - Commerce Guys - Community Driven Innovation :.


        MODx est l'outil id
        • 23491 ☆ A M B ☆
        • 1,056 Posts
        Yay! Christmas came early this year wink
          Mike Reid - www.pixelchutes.com
          MODx Ambassador / Contributor
          [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
          ________________________________
          Where every pixel matters.
          • 23491 ☆ A M B ☆
          • 1,056 Posts
          Sort of odd...

          I’ve had a custom plugin running on the OnWebLogin event. It was working great w/ v1.2.0, but as of 1.3.0 it throws an error...

          It APPEARS that the custom SQL that is run on that event errors as a result of $modx->getLoginUserID() not returning a value.

          Now, this to me would make sense if I was using OnBeforeWebLogin, but I am not.

          OK...so OnWebLogin events seem to behave in different order from the default WebLogin snippet and WLPE 1.2.0 ...is there something I am missing or need to do to ensure this event gets ran at the right time? It’s like the event is firing prematurely or something??

          (Going through docs now...)

          Update:

          OK, so reviewing the API docs, do I need to set
          &OnWebLogin=`myPluginName`
          to correctly tie the events huh
            Mike Reid - www.pixelchutes.com
            MODx Ambassador / Contributor
            [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
            ________________________________
            Where every pixel matters.
            • 31037
            • 358 Posts
            Perhaps it’s time to give WebLoginPE it’s own subforum, a few weeks old and already have almost 20 pages tongue
              • 23491 ☆ A M B ☆
              • 1,056 Posts
              Quote from: Uncle68 at Sep 13, 2007, 11:35 AM

              Perhaps it’s time to give WebLoginPE it’s own subforum, a few weeks old and already have almost 20 pages tongue

              I’ll second that smiley
                Mike Reid - www.pixelchutes.com
                MODx Ambassador / Contributor
                [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
                ________________________________
                Where every pixel matters.
                • 23491 ☆ A M B ☆
                • 1,056 Posts
                Houston, we have a problem:

                While I really like that I can still access $user and the needed elements, not having full MODx API control seems to be a big issue...

                For example:

                I am running a MODx function from within my OnWebLogin plugin:

                $modx->getActiveChildren( ... )
                


                getActiveChildren takes PERMISSIONS into account, however I never get any documents back as of WLPE 1.3.0 sad

                I’m not sure exactly why modx->getUserLoginID would work w/ the default MODx WebLogin and WLPE v1.2.0, but I feel that it is pretty crucial.

                Any ideas??
                  Mike Reid - www.pixelchutes.com
                  MODx Ambassador / Contributor
                  [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
                  ________________________________
                  Where every pixel matters.
                  • 23491 ☆ A M B ☆
                  • 1,056 Posts
                  It appears that modx->getLoginUserId() IS working afterall...
                  ...seems to be related to premature invocation of OnWebLogin event on "invalid login" attempts...

                  however, $_SESSION[’webDocgroups’] doesn’t appear to be set before "OnWebLogin"

                  In webloginpe.class.php update this:

                  		$this->OnWebLogin();
                  		$this->ActiveUsers();
                  		$this->UserDocumentGroups(); // Current Line # 227
                  


                  ...to this:

                  		$this->UserDocumentGroups(); // New Line # 225
                  		$this->OnWebLogin();
                  		$this->ActiveUsers();
                  


                  ...and now it works great!!
                    Mike Reid - www.pixelchutes.com
                    MODx Ambassador / Contributor
                    [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
                    ________________________________
                    Where every pixel matters.
                    • 23491 ☆ A M B ☆
                    • 1,056 Posts
                    Aaah...
                    It appears that OnWebLogin is being invoked even if I enter invalid login info...which is why I initially thought getLoginUserID wasn’t working...

                    If you create a plugin tied to the OnWebLogin system event, test out an "invalid login" (for a user that actually exists) and you should see the event is invoked prematurely.

                    Update: This may be tied to the Authenticate method, which OpenGeek and I are discussing. Upon more feedback I can relay what we find and any recommendations/concerns.
                      Mike Reid - www.pixelchutes.com
                      MODx Ambassador / Contributor
                      [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
                      ________________________________
                      Where every pixel matters.
                      • 7455
                      • 2,204 Posts
                      @scotty:
                      printstyle needs to be linked like this:
                      <link rel="stylesheet" href="style/webloginpe.print.css" type="text/css" media="print" title="WebLoginPE [Print]" charset="utf-8">
                      


                      now its not working

                      greets Dimmy
                        follow me on twitter: @dimmy01