Auto Login after account semi-manual creation

I found this article:

My question is, if I have a users data that was passed from a payment processor, and I’m able to authenticate they did in fact pay, so now I have their email address and everything else, so I can assign a password based upon their own data, and then email them the username and password.
Can I then auto log them in doing that as on that page? it appears that may be only if the use the action=register of the login page…

I want to make it where I just pass them through a page that will log them in, since they just paid and I just created the account upon their landing on the website, so is there a way to auto log that browser in?

I am using the wp_create_user, to create the account, then update the user with the data passed to the browser that I authenticate from the payment processor.

One account created per order_id… and the order_id is authenticated because before their browser gets there the payment processor hit the site with a webhook, so I’ve already verified the order_id is a paid one, so that way if they copied the url and changed the order_id it would not work, since the payment processor did not notify the website of the order_id…

Thus protecting the accounts.

can the browser, after I create their account, redirect them to a page like the one here: and auto log them in?
or am I correct, it only works with the action=register wp registration system?


I haven’t tried it. Go ahead an test it.

Not sure what you have, but if you created the account, you likely used the WP routines for that. Maybe you need to add a hook to that hack, I don’t know.

I’m currently using the info in that article to auto login my customers, but there have been threads here when others have said it doesn’t work.

All I can say is that it’s still working for me. It might have to do with my custom hacks, etc. but it works.

As far as sending passwords via email, I actually had some upset users when I did that a couple years or so ago.

And even then most legit email providers used SSL/TLS but the whole “don’t send passwords over email” security recommendation was still out there. So you might have users that think they are tech savvy upset at that.

I found a way to do it… I a have a lifetime with unlimited access of LoginPress, one of the “addons” included is an Auto Login system… I looked at the code and seen how they are doing it, so I modified it to do what I want. works perfectly. :slightly_smiling_face: easy as 123. :slight_smile:

Glad I looked into it. was really easy to do.

1 Like