Hello all,
What would be the best way to approach the implementation of a two step authenthication method?
Would it be suitable to set a state on the extended CUserIdentity class and test it?
The result I am aiming at is:
1) User inputs username and password
2) User is taken to another page that asks for zip code and town
If only step one is verified, I would like the user to be diverted directly to Step 2 without being able to progress to other areas of the site.
If both steps requirements are satisfied, then user is considered logged in and will be taken to the relevant page.
Any help much appreciated.
Cheers,
Cass
Page 1 of 1
Two step authentication
#2
Posted 31 October 2009 - 03:48 PM
cass, on 31 October 2009 - 02:50 PM, said:
Hello all,
What would be the best way to approach the implementation of a two step authenthication method?
Would it be suitable to set a state on the extended CUserIdentity class and test it?
The result I am aiming at is:
1) User inputs username and password
2) User is taken to another page that asks for zip code and town
If only step one is verified, I would like the user to be diverted directly to Step 2 without being able to progress to other areas of the site.
If both steps requirements are satisfied, then user is considered logged in and will be taken to the relevant page.
Any help much appreciated.
Cheers,
Cass
What would be the best way to approach the implementation of a two step authenthication method?
Would it be suitable to set a state on the extended CUserIdentity class and test it?
The result I am aiming at is:
1) User inputs username and password
2) User is taken to another page that asks for zip code and town
If only step one is verified, I would like the user to be diverted directly to Step 2 without being able to progress to other areas of the site.
If both steps requirements are satisfied, then user is considered logged in and will be taken to the relevant page.
Any help much appreciated.
Cheers,
Cass
You can solve this by using a combination of CWebUser::setFlash(), CWebUser::getFlash() and CWebUser::hetFlash()
php:
foreach(array('cat', 'dog', 'cow') as $animal) echo $animal."\n";
python:
[(animal, print(animal)) for animal in ['cat', 'dog', 'cow']]
ruby:
['cat', 'dog', 'cow'].each {|animal| puts animal}
You say Tomato, I say Tomato.
#3
Posted 01 November 2009 - 05:43 AM
jayrulez, on 31 October 2009 - 03:48 PM, said:
You can solve this by using a combination of CWebUser::setFlash(), CWebUser::getFlash() and CWebUser::hetFlash()
Hello jayrulez. Thanks for your reply, but flash messages in that context are partly relevant, as they would only replace messages that would otherwise be shown on the view.
My question is about maintaining a state that is neither logged in nor logged out - it is something in between which would allow for the zip code/town check to happen.
Cheers
Cass
#4
Posted 07 November 2009 - 03:31 AM
cass, on 01 November 2009 - 05:43 AM, said:
Hello jayrulez. Thanks for your reply, but flash messages in that context are partly relevant, as they would only replace messages that would otherwise be shown on the view.
My question is about maintaining a state that is neither logged in nor logged out - it is something in between which would allow for the zip code/town check to happen.
Cheers
Cass
My question is about maintaining a state that is neither logged in nor logged out - it is something in between which would allow for the zip code/town check to happen.
Cheers
Cass
Hi all,
I ended up using sessions for this and it worked as it should.
Cass
Share this topic:
Page 1 of 1

Help











