Code: Select all
$user_itc_status = 1;
Oops, that's phpBB3 syntax. phpBB2 syntax is simply $userdata['user_itc_status'].Brf wrote:That value would be found in $user->data['user_itc_status']
Let's say the correct behaviour/codeing of phpbb2 it is not like the one you are describing, it is correct though to store a flag into the DB, say the config_table.. then read the flag that's passed through the phpbb2/(or your own) core code till reaches the exact location where to be used for some related purposes. I didn't fully read this topic though.worker201 wrote: In the UPDATE queries I studied, values were never directly passed -- variables were set and then their values were passed. The line from this part of the code that reads:was part of my attempt to follow this pattern - it doesn't actually need to be there. I was planning to use that variable in place of the integer 1 in the SQL query. user_itc_status in the table is a value set to either 1 or 0. Its default value is 0, and the conditions outlined here are the only circumstances in which it will be modified to 1.Code: Select all
$user_itc_status = 1;
I thought $userdata referred to the currently logged in user. This code is called by a registered user but affects another registered user. My understanding is that setting $userdata['user_itc_status'] would affect the currently logged in user. Please correct me if I am wrong.drathbun wrote:Oops, that's phpBB3 syntax. phpBB2 syntax is simply $userdata['user_itc_status'].Brf wrote:That value would be found in $user->data['user_itc_status']