function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Sathiskumar ShanmugamSathiskumar Shanmugam 

Session Maintenance between VF pages

Hi all,

 

Greetings!

 

I am developing Force.com public site in Developer Edition.

 

I have a query on maintaining session between VF pages.

 

I have created one custom object to store username and password.

 

Created two VF pages called Login and Welcome and enabled for Force.com site.

 

Once the user enters login credentials on login VF page, the controller will authenticate the user and it will redirect to Welcome VF page. After logged out if I click on back button it goes to the welcome VF page without authentication details.

 

So, my query is how to maintain session between VF pages.

 

For Eg. here I should maintain session between Login and Welcome VF pages.

 

Let me know, is there anyway to maintain session in VF pages.

 

Thanks in advance.

AJSFDCAJSFDC

Are you trying to use custom authenitcation instead of salesforce portal license? If yes then you should use portal license. As per the sites policy you should not try to manage your own username and password without license.

 

Cheers,

AJ

Sathiskumar ShanmugamSathiskumar Shanmugam

Hi,

 

Thanks for the valuable reply.

 

 

ShahTheTrainerShahTheTrainer

you can use Global Variable - User i.e.

<apex:page>
    <apex:outputText value="Hi {!$User.FirstName} {!$User.LastName}! Welcome to our Organization!" />
</apex:page>

 please mark it as SOLVED  if you got the answer.