+ Start a Discussion
JWikkJWikk 

Sites: 'You are already logged in' message after successful registration

We are using the template SiteRegistration Sites VF page to allow users to login. And made a minor controller code change to the PORTAL_ACCOUNT_ID as per instructions on : http://wiki.developerforce.com/page/Authenticating_Users_on_Force.com_Sites

 

We successfully register one user, but after the 2nd attempt of a another new user, we get the message 'You are already logged in'

 

We used the template, made only a minor change. What did we do wrong?

 

We are thinking it may be that we can't re-use the same account id? But has anyone else got this before?

 

James

BasicGov Systems

Best Answer chosen by Admin (Salesforce Developers) 
JWikkJWikk
Turns out the registration was successful, but the we did not logout the first user before registering again. The system gets confused about who is logged in. We have to see how we can log out the current user or redirect the user away from the registration page if already logged in.

All Answers

JWikkJWikk
I should mention we are creating new contacts rather than matching existing contacts in our system. The new contacts are getting linked to that same portal account id.
JWikkJWikk
Turns out the registration was successful, but the we did not logout the first user before registering again. The system gets confused about who is logged in. We have to see how we can log out the current user or redirect the user away from the registration page if already logged in.
This was selected as the best answer
Ganesh Sridhar 9Ganesh Sridhar 9
@JWIKK Could you please elaborate on the issue that you had. We are encountering a similar issue with registration and would need insight into how you resolved it.