Forums / Developer / Pre filled user register / Login handler redirection
Maxime Thomas
Monday 25 August 2008 3:05:28 am
Hi,
I have to implement the following feature : we are migrating a website based on SQLServer and we would like not to import all the users in the database for performances reasons. So, we decided to check if the user exists in a list of former users and then to show the user register form pre filled by the former information. I currently created a specific Login Handler and I find the former user in the list. I also set the variable as a session variable to mak it available in the user register form. The only problem is that if the user is not authentified, he is redirected to the user login form. So, as our former user doesn't exist, he will always be redirected to the login page.My idea was to redirect him directly at the end of the login handler but I cannot figure out how to access the $Module value...
If someone knows how...
Max
Maxime Thomas [email protected] | www.wascou.org | http://twitter.com/wascou Company Blog : http://www.wascou.org/eng/Company/Blog Technical Blog : http://share.ez.no/blogs/maxime-thomas
Monday 25 August 2008 3:21:18 am
I tried with the $http->redirect function so I can redirect my user to the user register form and pre filled the form with the values stored in the session. But when I try with another former user, I still get the data of the former user... Though, I have cleaned the session variable. Very strange.
Monday 25 August 2008 3:43:42 am
Apparently, when you change the header you lose the changes of the PHP session. Too bad. Does someone know how to avoid that beahvior ?
Monday 25 August 2008 4:42:13 am
So, it seems to be a common solution, just close the session handler before redirect by :
session_write_close();
Victor Dujardin
Thursday 12 March 2009 9:16:12 am
Hi Maxime,
Like you did, I'm interested in checking a user existence in a (not eZ) database before registering.Could you help me and give some tips to manage that, e.g. files to modify or even code if you don't bother. This would be really helpful.
Thanks.
Jean-Yves Zinsou
Friday 13 March 2009 3:33:17 am
Hi Maxime, thanx for sharing ... Can be very usefull!
Do Androids Dream of Electric Sheep? I dream of eZpubliSheep.... ------------------------------------------------------------------------ http://www.alma.fr