Hi David,

please read up on snapbacks, it snaps back to the first element that the user visited in a request. So if you create a new request that goes directly to the logout element, it will snap back to that element:
http://rifers.org/wiki/display/RIFE/Snapbacks

If you don't want to litter the setup element (or your subsite) with detection code for a submission that exist to the logout element. You can use precedence to isolate this.

Hope this helps,

Geert

On 17-mrt-06, at 11:41, David Herbert wrote:

I am having trouble getting a simple logout working with a logged- in memory user. I have a stage of my app when I need to install lots of Postgres tables, so I log in as a memory user admin. This displays a menu of options, including logout. Everything works fine apart from the logging out, which hangs. What I would like is for the logout functionality to take me back to the setup menu page as a logged-out user i.e. redisplay the login screen. I believe that the snapback functionality should do this? Where am I going wrong?

Relevant bits of site file:

<site>
    <globalvar name="authid"/>
    <arrival destid="SETUP"/>
    <departure srcid="LOGOUT"/>
    <element id="AUTHMEM" file="authmem.xml"/>
<element id="SETUP" file="setup.xml" url="/setup" inherits="AUTHMEM">
        <flowlink srcexit="logout" destid="LOGOUT"/>
    </element>

... other elements removed ...

<element id="LOGOUT" file="rife/logout/passthrough/memory.xml" url="/logout">
        <flowlink srcexit="logged_out" snapback="true"/>
    </element>
</site>

Relevant bit of setup.xml:

<element implementation="uk.co.communitytech.SetupHome">
    <property name="name">home</property>

... other exits removed ...

    <submission name="logout"/>
    <exit name="logout"/>
</element>

Relevant bit of authmem.xml:

<element extends="rife/authenticated/memory.xml">
    <property name="template_name">login</property>
    <property name="role">admin</property>
    <submission name="credentials">
        <param name="login"/>
        <param name="password"/>
    </submission>
    <childtrigger name="authid"/>
</element>

Any help much appreciated!

David Herbert.
_______________________________________________
Rife-users mailing list
[email protected]
http://lists.uwyn.com/mailman/listinfo/rife-users


--
Geert Bevin             Uwyn bvba               GTalk: [EMAIL PROTECTED]
"Use what you need"     Avenue de Scailmont 34  Skype: gbevin
http://www.uwyn.com     7170 Manage, Belgium      AIM: geertbevin
gbevin at uwyn dot com  Tel: +32 64 84 80 03   Mobile: +32 477 302 599

PGP Fingerprint : 4E21 6399 CD9E A384 6619  719A C8F4 D40D 309F D6A9
Public PGP key  : available at servers pgp.mit.edu, wwwkeys.pgp.net


_______________________________________________
Rife-users mailing list
[email protected]
http://lists.uwyn.com/mailman/listinfo/rife-users

Reply via email to