Gracefully logging out new Guest after registration(SOLVED)

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
ddumas
Posts: 389
Joined: Tue Apr 23, 2013 11:17 pm

Gracefully logging out new Guest after registration(SOLVED)

Post by ddumas »

I have a Guest registration that works fine, but I would like to exit the visual Perspective (Logout) after the Guest registers. Right now, the guest user is left with a Visual Perspective still in the browser tab.

I have attached 2 screenshots. (1) where the Guest Visual Perspective shows the first command process that registers a guest, and (2) the actual process that is called.

I have tried a Logout command in the process as the last step, but that does not work.

Ultimately, I would like to close the browser tab.

Dave
Attachments
AddGuest_process.PNG
AddGuest_process.PNG (77.43 KiB) Viewed 13976 times
GuestVP.PNG
GuestVP.PNG (47.29 KiB) Viewed 13976 times
Last edited by ddumas on Fri Feb 21, 2020 3:24 pm, edited 1 time in total.
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Re: Gracefully logging out a new Guest after registration

Post by tford »

I had a BSV where I used DISPLAY PERSPECTIVE after DISPLAY MESSAGE so the user sees a message that makes it clear they can close the browser tab.

That was in an older version of Aware. Not sure if there is a better approach now.
Tom - V8.8 build 3137 - MySql / PostGres
idpSteve
Posts: 201
Joined: Thu Jul 27, 2017 6:13 am
Location: Johannesburg, South Africa
Contact:

Re: Gracefully logging out a new Guest after registration

Post by idpSteve »

This should work- add a new rule after your display message:

EXEC_SCRIPT `AwareApp.logout('logonAdmin.html');`

You'd need to change the 'logonAdmin.html' to the name of the login page for your app if that's where you'd like users to end up..

Let me know!
ddumas
Posts: 389
Joined: Tue Apr 23, 2013 11:17 pm

Re: Gracefully logging out a new Guest after registration

Post by ddumas »

so, you have quotes within quotes. Is that correct?
idpSteve
Posts: 201
Joined: Thu Jul 27, 2017 6:13 am
Location: Johannesburg, South Africa
Contact:

Re: Gracefully logging out a new Guest after registration

Post by idpSteve »

Sort of.. If you need to enclose a quote in quotes you can use a grave accent for the outside 'quotes' .

So for example:

DISPLAY MESSAGE `Please don't use quotes` works,

DISPLAY MESSAGE 'Please don't use quotes' won't work.
ddumas
Posts: 389
Joined: Tue Apr 23, 2013 11:17 pm

Re: Gracefully logging out a new Guest after registration

Post by ddumas »

Oh, thanks - good to know.
Dave
customaware
Posts: 2391
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Re: Gracefully logging out a new Guest after registration

Post by customaware »

What if you want to use a dynamic specification for the Login Page. Such as SystemSettings.LoginPage

I expected
EXEC_SCRIPT `AwareApp.logout(`+SystemSettings.LoginPage+`);`
but that does not work.
Tried many variants now and cannot get any to work. Surely something dumb... Has been a long day ;-)
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
idpSteve
Posts: 201
Joined: Thu Jul 27, 2017 6:13 am
Location: Johannesburg, South Africa
Contact:

Re: Gracefully logging out a new Guest after registration

Post by idpSteve »

Hi Mark.

This works for me:

EXEC_SCRIPT `AwareApp.logout('`+SystemSettings.LoginPage+`');`
customaware
Posts: 2391
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Re: Gracefully logging out a new Guest after registration

Post by customaware »

Thanx Steve. Perfect.
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Gracefully logging out new Guest after registration(SOLVED)

Post by Jaymer »

Thanks, seeing this example helped my Syntax. Was a tricky bugger

EXEC_SCRIPT `notifyBar('` + AS_STRING(SEARCH_COUNT) + ` pickups would have been closed. ` + `');`

Code: Select all

EXEC_SCRIPT `notifyBar('` + AS_STRING(SEARCH_COUNT) + ` pickups would have been closed. ` + `');`
--> JaymerTip EXEC_SCRIPT Syntax examples
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
Post Reply