In Oracle ATG, how can I prevent logged in user againto login

1.1k Views Asked by At

In oracle ATG, how can we prevent a user who is already logged into the site from login again. In my application if the user is logged in and if he comes back to login page and try to login again it is showing invalid session. Can we disable this in atg?

1

There are 1 best solutions below

0
On

There are a number of ways to achieve what you want:

  1. You could include logic on the jsp which contains the login form fragment to include different fragements based on whether the user is logged in or not e.g. if the user is logged in include a fragment which says "You are already logged in or similar"
  2. You could use the Redirect droplet e.g.

    <dsp:importbean bean="/atg/dynamo/droplet/Switch"/>
    <dsp:droplet name="Switch">
     <dsp:param name="value" param="Profile.isTransient"/>
    <dsp:oparam name="false">
       <!-- redirect to another page -->
       <dsp:droplet name="/atg/dynamo/droplet/Redirect">
         <dsp:param name="url" value="http://www.acme.com/alreadyLoggedIn.jsp"/>
       </dsp:droplet>
    </dsp:oparam>
    <dsp:oparam name="true">
      <!-- do nothing -->
    </dsp:oparam>
    </dsp:droplet>`