0 Replies Latest reply on Oct 4, 2010 2:27 AM by Nicola Ben

    Change password + redirect

    Nicola Ben Novice

      Hi,
      in my login.page.xml I'd like to add a rule to redirect a user when he has to change his password at his first connection.
      In my user.java class I added a db-field 'firstConnection'.
      What I miss is a way to retrieve my user from identity or something similar:


      <navigation from-action="#{identity.login}">
             <rule if="#{identity.user.firstConnection}"> <!- how retrieve user from identity? ->
               <redirect view-id="/changePassword.xhtml"/>
            </rule>
            <rule if="#{identity.loggedIn}">
               <redirect view-id="/home.xhtml"/>
            </rule>
         </navigation>



      Do you have any suggestions, please?


      Thank you,
      Nicola