Thread: User.isHost() or Session.IsHost?
-
May 9th, 2021, 15:02 #1
- Join Date
- Mar 2009
- Location
- Lidingö, Sweden, Europe
- Posts
- 374
User.isHost() or Session.IsHost?
Both User.isHost() and Session.IsHost seems to do the same thing. Is one recommended over the other?
/Peter
-
May 9th, 2021, 15:04 #2
I believe you should generally be using Session.IsHost() now.
-
May 9th, 2021, 15:26 #3
- Join Date
- Mar 2009
- Location
- Lidingö, Sweden, Europe
- Posts
- 374
-
May 10th, 2021, 06:03 #4
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,559
Session.IsHost is a boolean value in a package of variables. The Session package of variables was specifically created to register common variables requested; so that API functions would not need to be called (which take more overhead) (such as User.isHost())
Regards,
JPG
-
May 10th, 2021, 07:21 #5
Both continue to exist from what was mentioned previously - but as Moon mentioned, using Session.IsHost (capital I or get errors like I did once ;P) is the better way to go for performance.
FYI, Moon Wizard posted this in response to an earlier ask on the subject:
Some of these can replace equivalent function calls (perhaps they all do, I haven't used all of the things they replace yet) in other locations like User (sLocal()), etc.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks