We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38471
    • 6 Posts
    I'm trying to learn Login (1.7.1 on Revo 2.2.0-pl2) for a client this week, and I've hit a wall. (Again, but that's just me.)

    So far, a user can register, get a confirmation e-mail, click the link in the e-mail and be activated. However, I want the user to be logged in when activated, which according to the docs happens by default, because the "authenticate" property defaults to 1.

    So I set it anyway, just to be sure. My confirmation e-mail goes to Resource ID 7, which has the following in it:

    [[!ConfirmRegister? &authenticate=`1` &redirectTo=`8`]]
    


    When the new user clicks on the link in the e-mail, the link opens Resource ID 7, activates the user, and then goes to Resource ID 8. Resource ID 8 has the following at the top (note that "firstname" is an extended field that I am capturing in the registration form, and it is being properly stored in the user account):

    [[!Profile? &prefix=`user.`]]
    
    Welcome, [[+user.firstname]]!
    


    No matter what I put in for firstname while registering an account, the page always says "Welcome, !" (that is, a blank name).

    This leads me to believe the user is not being logged in when ConfirmRegister runs. I have read the docs up and down, backwards and forwards, and maybe I've missed it, but I don't see a function in the Login Add-On that will just tell me, for debugging purposes, if a user is logged in. Even something that returns a 1 if there's a user logged in or a 0 if there isn't. Without that, I have to assume that they're not logged in.

    I have tested this on multiple browsers on my Mac (including ones on which I am not logged into the manager with a different account), and had a friend test it on Firefox/Win. We're both getting the same result.

    So, what am I doing wrong, and how do I get over this bump in the road?

    -m
      • 1778
      • 659 Posts
      Hi,

      Not sure you're wrong anywhere.... I think there's a little bug in the part authenticate of Login.ConfirmRegister...
      It seems it only loads the first part of identification, so you appear to be logged in but you cannot access any info about the user...
      I faced the same problem, and read some other posts in the forum about this... The only working solution I found is to set "&authenticate=`0` " and to redirect the user to a login page... Not ideal but it works...
      Cheers