What is the 2.0 version of `nlapiGetWebcontainer` ...
# suitecommerce
c
What is the 2.0 version of
nlapiGetWebcontainer
?
s
There isnโ€™t a direct comparison. Depending on what you want, you may want, for example, the runtime module https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/section_4296359529.html
c
Thank you @Steve Goldberg, I'll take a look.
Is it possible to determine if a user is logged in from 2.0?
s
Yes
My advice is to look at the SuiteScript 2.0 code we include in the SCA bundle
To answer your specific question, look under Backend > SC > Libraries > Auth > User.ts
Copy code
public isLoggedIn(): boolean {
    return this.currentUser.id > 0 && this.currentUser.role !== 17;
}
๐Ÿ‘๐Ÿป 1
As with SS 1.0 in SCA, we analyse the current user and check them against the defaults
c
Perfect. ๐Ÿ™‚
netsuite halo 1