We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18913
    • 654 Posts
    Rather than have a user click on the "Register" button to create their user account for a site, I would like to have only one user be able to do this for users.

    I can set that "special" user up fine and and assign documents to them that only they can see when they are logged in. One of those pages is a call to WebLoginPE with type="register". This allows that user to fill out the account form for a user, after which that user gets an email.

    The problem is that this then logs out the "special" user.

    Does anyone know how I can accomplish the same thing without the user getting logged out? Also, how could I trigger a confirming email to be sent to the admin?

    I’ve searched the archives and the docs at sottwell.com but nothing is jumping out at me. I’m hoping some of the more WLPE-savvy folks can chime in.

    Thanks in advance,
    Matt
      • 18913
      • 654 Posts
      In looking at the code, it would seem that if I don’t execute this line (around 763 in webloginpe.class.php, in function Register)
      $this->SessionHandler('destroy');

      then the user stays logged in.

      Does anyone know if I am correct on this and if this would create other problems?
      Again, thanks for any thoughts,
      Matt