Kharon wrote:Username [Details]:
Code: Select all
PHP Notice: in file /includes/functions_invite.php on line 618: Undefined variable: new_user_row
functions_invite.php on line 618:
Code: Select all
$new_users[] = get_username_string('full', $new_user_row['user_id'], $new_user_row['username'], $new_user_row['user_colour'], false, $profile_url);
Can you post a screenshot of the data in phpbb_iaf_keys table? As I'm using the following sql:
Code: Select all
$sql = 'SELECT * FROM ' . INVITE_KEYS_TABLE . ' WHERE user_id = ' . $data['user_id'] . ' AND key_used = 1';
... this error actually can't occur except key_used = 1 and new_user = 0 in phpbb_iaf_keys. (As those values are always inserted at the same time key_used = 1 and new_user = 0 is not possible if you don't change the data in phpbb_iaf_keys)
Hm... anyway, here's your fix:
------------------------------------------------------------------------------
Open: includes/functions_invite.php
Find (604-618):
Code: Select all
// Get information on all new users, who were invited by our current user
$sql2 = 'SELECT * FROM ' . USERS_TABLE . ' WHERE user_id = ' . $invitations_row['new_user'];
$result2 = $db->sql_query($sql2);
while ($row2 = $db->sql_fetchrow($result2))
{
foreach ($row2 as $k2 => $v2)
{
$new_user_row[$k2] = utf8_normalize_nfc($v2);
}
}
$db->sql_freeresult($result2);
// Add them to an array so we can use implode() later
$new_users[] = get_username_string('full', $new_user_row['user_id'], $new_user_row['username'], $new_user_row['user_colour'], false, $profile_url);
Replace with:
Code: Select all
// Fix: Undefined variable: new_user_row
if ($invitations_row['new_user'])
{
// Get information on all new users, who were invited by our current user
$sql2 = 'SELECT * FROM ' . USERS_TABLE . ' WHERE user_id = ' . $invitations_row['new_user'];
$result2 = $db->sql_query($sql2);
while ($row2 = $db->sql_fetchrow($result2))
{
foreach ($row2 as $k2 => $v2)
{
$new_user_row[$k2] = utf8_normalize_nfc($v2);
}
}
$db->sql_freeresult($result2);
// Add them to an array so we can use implode() later
$new_users[] = get_username_string('full', $new_user_row['user_id'], $new_user_row['username'], $new_user_row['user_colour'], false, $profile_url);
}