Customizing SMF > SMF Coding Discussion

Difference between is_guest and is_logged ??

(1/1)

dagod:
Hi,

ist there a a special reason to have both $context['user']['is_guest'] and $context['user']['is_logged'] ??
I think is_guest=1 always means is_logged=0, so what is the reason to have both variables?
Or is there a difference?

codenaught:
They are essentially the same thing. The only thing I can think of is for clarity. That perhaps $context['user']['is_logged'] is easier to understand than !$context['user']['is_guest']. Although there are places in the code where !$context['user']['is_guest'] is used anyway. ;)

Laloeka:
I know this topic is very old, but:

What if it's google visiting your forum?
Will it sill be the same result? I'm anxious to use is_logged or is_guest without knowing weather or not google will drop by and visit pages it shouldn't be able to see :)

Arantor:
Google will always be using is_guest.

Laloeka:
Allright,

thanks for the confirmation :)

Navigation

[0] Message Index

Go to full version