NSL Sample Script - Avoiding a Login Loop

Novell Cool Solutions: Tip

Digg This - Slashdot This

Posted: 8 Feb 2006


A reader asked the following question:

"Can someone give some script on how to fix the following problem? When clicking Logoff in an IE app, NSL re-logs me back into the same IE app I just clicked Logoff for. Is there some redirecting script to stop this loop? I'm attempting to log out of IE apps, but NSL basically won't let me."

And here's the answer from Forum expert Eric:


Yes that is possible. You need to use a new variable (i.e., ?LoggedIn) that you set to "1" or "YES" when your user has logged in succesfully.

Now in the beginning of the script, you check to see if this variable is already set. If it is, you ask if they would like to log in again. If they choose not to, you redirect them to another page. In a nutshell your script would look something like this:

If ?LoggedIn Eq "1" 
          MessageBox 'Would you like to login again?" -YesNo ?Choice 
          If ?Choice Eq "Yes" 
                     Call Login 
                   GotoUrl "www.protocom.com" 
          Call Login 


Sub Login 
Type $Username #1 
Type $Password Password 
Set ?LoggedIn "1" 

Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com

© Micro Focus