The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
4.3.9 during_user_creation.php $theNewId Off by Three
#1
Hello,

I have found that the $theNewId php varible as used in the 'during_user_creation.php' file is not the same value as in join.php but is actually 3 less. In other words, I have to add three to update the additional fields in the same users table record.

Code:
dump($theNewId);
// off by -3 (minus three)
Code:
$db->update('users',$theNewId + 3,['account_id'=>Input::get('account_id')]);
// add three to update the correct record in users table.

- Mike

  Reply
#2
What happens if you go to the top of during_user_creation.php and do
$id = $db->lastId();
dump($id);
Is it right?
  Reply
#3
It is still off by three. No difference.
  Reply
#4
Thanks for taking the time to respond Dan.

To clarify, all of the original field values in join.php and _join.php are entered into the new record in the MySQL database. The off-by-three problem arises for the additional fields added, in this case the example account_id plus, area_code and phone_number are entered three rows above the new record. Quite a mystery to me!

- Mike
  Reply
#5
Update: The off-by-three problem does not exist on our test server, just the dev server.

-Mike
  Reply
#6
Hmm. Sorry this one has hung out there too long. Let me make an "official" ticket for it on userspice.com/bugs and we'll try to fix it on our end. I may be contacting you to get you to test a few fixes! Today is out for me, but hopefully things will be a little slower tomorrow.
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)