Buy Now
Sign in

Query structure at login

Fredolino , December 07 2017
Fredolino
Hi,

in the frontend a user logs in with a PCode.
Read data checks if the PCode is present.
If he wants to log in for the first time, he will be registered, can log in and will be forwarded to a specific page with the PCode.

If the user logs in the second time, he automatically gets the message: "A user with the name and the e-mail address already exists." And the user can not log in.

Therefore, in the "fail" of Save User "is a read data action that checks whether input data matches the user data and PCode in the database.
If the data agree, then he can log in and will be redirected to his page.

The first part in read data -found works.

Part 2 in the "Read data / Save User-fail" does not work.
The second part only works if I have no read data in the "Save User-fail" and only the login.
But then the examination of the user data is missing.
What do I have to change?

Best regards
F.
Attachments
screen.jpg
screen.jpg
(123.02 KiB)
26 Downloads/Views
GreyHead
Hi Fredolino,

I think that the logic you have is faulty. When you submit the form the user is not logged in so does not have a User ID so you can't check for that.

I made a copy of your form with different logic on submit

+ try to log the user in using the supplied prmiencode+password
++ if that succeeds then redirect
++ if that fails then create a new user and then log them in

Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much