We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 9439
    • 90 Posts
    Hi, I’ve searched for this but seems no one’s asked before. Is it possible to configure/change wlpe to allow login (say after registration) using only a username or password? In other words there’s only one user registered but that username or password will be given to selected people to login.

    thanks

    David Heriot
      David Heriot
      pfsmedia
      • 4310
      • 2,310 Posts
      WebLoginPE uses several functions/events during login checking username/password combinations, so it would require several modifications.
      Why not setup ’Guest User’ & ’123456’ to use as a common login?
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        You could create the form to have the username already set as the username field’s value, then hide the field in the .css

        You could use a plugin to set the value of either the $username variable or $userpassword variable; probably the OnBeforeWebLogin event would be the one you want.
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
          • 9439
          • 90 Posts
          Thanks to you both. I thought mods would be complex. I hadn’t thought of simply hiding the username in the css - more within my range than using plugins as I’m guessing that implementing the OnBeforeWebLogin event involves a fair bit of php programming?
            David Heriot
            pfsmedia
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            Yes, plugins are PHP code that gets inserted into the appropriate place during normal processing (such as processing a user login); which is why they’re called "plugins" - the code is literally "plugged in" to the processing script’s code. To specify which system event to use, one simply checks the checkbox for the desired event in the System Events tab of the plugin.
              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org