Both User.isHost() and Session.IsHost seems to do the same thing. Is one recommended over the other?
/Peter
Printable View
Both User.isHost() and Session.IsHost seems to do the same thing. Is one recommended over the other?
/Peter
I believe you should generally be using Session.IsHost() now.
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
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.