We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27330
    • 884 Posts
    anyway to make user that is logged in Manager be logged in in front end as well without the need to log in with WebLogin?
      • 7923
      • 4,213 Posts
      You could do a plugin to the onmanagerlogin event (or whatever it is) and do the webuser logging there at the same time.. You can copy the code for the plugin from weblogin snippet.


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 27330
        • 884 Posts
        Do you mean i could find the code needed in the snippet and work with it to code a plugin or simply a matter of copy paste?
        (I’m a php n00b)

        or even better, do u know if such plugin is out there? I’m sure I’m not the first one who wanted this.
          • 32982
          • 674 Posts
            Jabiertxof (formerly XYZVISUAL)
            My bussines: http://marker.es
            https://www.youtube.com/user/jabiertxof/videos
            • 27330
            • 884 Posts
            Hi Javier, I think this is exactly what I’m looking for.
            but I’m getting this error on manager login (and login failed too)

            [img]http://img171.imageshack.us/img171/3999/modxerrorbg5.png[/img}

            I copied the first code into a plugin with uniqe name and checked OnManagerLogin
            the 2nd part of code I made another plugin and checked OnManagerLogout

              • 7923
              • 4,213 Posts
              Did you notice these lines at the plugin code:

              $username = heretheusername;
              $givenPassword = herethepassword;

              It only works for one user and you have to change those values. Try it in OnBeforeManagerLogin event (remember to change the case "OnManagerLogin" from the top of the code too), then use the following for username/givenPassword:

              $username = $modx->event->params[’username’];
              $givenPassword = $modx->event->params[’userpassword’];


                "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                • 27330
                • 884 Posts
                doze u are the man wink
                thanks for the fix.

                works great both in login and logout for any admin I have.




                  • 1511
                  • 144 Posts
                  Is it necessary to install webLogin snippet? If not, what is the webLoginAlert function?

                  I get the same error message as is shown on the picture above (see attachment).

                  What I have done is create a manager user, a matching web user, install the WebManagerLogin plugin, trigger it with the OnBeforeManagerLogin and corrected the code as Doze suggested.

                  Also, do users have to be Administrators to access the QuickEdit or can I assign a new group for them?

                  And, finally, if I login with the plugin enabled, the manager always informs me that my Error and Not-authorized pages are not set properly. If I start the manager without the plugin, everything works just fine.

                  I’ve tried the above method on MODx 0.95 and 0.95RC2 and neither seems to work.
                  The error I get when logging in is shown in attachment and it disappears when I clear the cache.

                  What is going on?