Forum Post: RE: MAB

  • Thread starter Thread starter whenshaw
  • Start date Start date
Status
Not open for further replies.
W

whenshaw

Guest
The most reliable way of knowing whether a session object is logged in is to check its loginResult property. If it's 1 (aka progress.data.Session.LOGIN_SUCCESS), it's logged in. If it's anything else, it isn't. It may be null, meaning there has been no attempt to log in with that Session object, or that it had logged in and is now logged out, or it may be an error code if a login attempt failed. Be aware that loginResult is a property of the underlying progress.data.Session object, not directly of any of the SessionService_Xxxxx services. To check it, you would need to access it off of the pdsession property of the SessionService_Session service : if (SessionService_Session.pdsession.loginResult === 1) (SessionService_Session is the default name for a Session service in a MAB app; if you renamed yours or created it yourself, it may be different. Don't bother to check the SessionService_Login or SessionService_Logout services, you need to check SessionService_Session -- however, you can do that from anywhere, including in handlers for events of the other Session services. -- Wayne

Continue reading...
 
Status
Not open for further replies.
Back
Top