Is equal $user_info... with $context...

Started by Jotade29, February 10, 2024, 11:47:22 PM

Previous topic - Next topic

Jotade29

V:2.0.19
Hii!!
I have a question about whether two global variables are the same, and if not, what is the difference.

Is $user_info['id'] = $context['user']['id'] ????

Thank you!!
Quote from: Diego Andrés on August 12, 2023, 02:20:18 AMI'm afraid convincing Jotade to upgrade to SMF 2.1 will require bigger effort than your work sanitizing Unicode characters  :laugh:

Kindred

Most of the time,  it is... but not always
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Arantor

Better question is why it matters.

If you have a user that is logged in, both will be the user id.

Any other state is officially considered indeterminate for both values though *usually* they're both set and set to 0.
Holder of controversial views, all of which my own.


Jotade29

Quote from: Kindred on February 11, 2024, 12:34:55 AMMost of the time,  it is... but not always

Thnx for answer, Kindred!! For example, in what cases not equals?

Quote from: Arantor on February 11, 2024, 03:23:25 AMBetter question is why it matters.

If you have a user that is logged in, both will be the user id.

Any other state is officially considered indeterminate for both values though *usually* they're both set and set to 0.

Thnx for this explanation, Arantor ^^

Quote from: Diego Andrés on August 12, 2023, 02:20:18 AMI'm afraid convincing Jotade to upgrade to SMF 2.1 will require bigger effort than your work sanitizing Unicode characters  :laugh:

Advertisement: