M
M
Mikha Pankratov2016-03-23 18:12:14
Yii
Mikha Pankratov, 2016-03-23 18:12:14

What would be the best way to do the registration logic?

Hello to all.
My registration is built on 3 steps:
Filling in the login and password (1 table)
Filling in information about the user (2 tables)
And some other information (3 table)

How can I best save data?
For example - 1 step filled in sent to the database moved to the second step.
Or all the steps to collect and then send? If this step - then with what tool to collect information from all 3 steps?
Naturally, I will switch between steps back and forth.
Thank you)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mylistryx, 2016-03-23
@frmax

actionStep1() - login\password here, validate, if everything is ok, then save to the database, remember the id of the new user and redirect to step2
actionStep2() - Fill in information about the user, validate, save to the profile model or to the user model, depends on database structures and redirect to step3
actionStep3() - And some other information, validation, save and redirect to where you want.
PS If such a set for registration is necessary for the functionality, then okay, but I would most likely run away if for some little thing I was asked to fill in forcibly at the first stage.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question