I'm modifying the register.php file to include an extra verification step before the account is created.
I seem to be passing all the correct information around, but perhaps not, because when it attempts to finish up I get the following error: "Could not register new user."
This error is caused by failing this test:
if (!$member_handler->insertUser($newuser)) {
(the same error may be triggered by a subsequent test, but I added some debugging output to check which one was being triggered, and it's the first one. The second one looks like this:
if (!$member_handler->addUserToGroup(XOOPS_GROUP_USERS, $newid)) )
I'm looking for more information on what would cause the insertUser operation to fail. I've swapped back in the unmodified register.php, and confirmed that it's a bug that my hack is introducing. I also re-confirmed that my xoops_users uid field is set to auto-incrememnt as another thread suggested.
I tracked that operation in register.php to a call in user.php, to a failure to do the following operation:
$result = $this->db->query($sql);
the query that's failing looks like:
INSERT INTO xoops_users (uid, uname, name, email, url, user_avatar, user_regdate, user_icq, user_from, user_sig, user_viewemail, actkey, user_aim, user_yim, user_msnm, pass, posts, attachsig, rank, level, theme, timezone_offset, last_login, umode, uorder, notify_method, notify_mode, user_occ, bio, user_intrest, user_mailok) VALUES (0, 'testuser', '',
'email@address.com', 'http://test.com', 'blank.gif', 1079903610, '', '', '', 1, '493c055b', '', '', '', 'fdba98970961edb29f88241b9d99d890', 0, 0, 0, 0, '', -8.00, 0, 'nest', 0, 1, 0, '', '', '', 1)
It looks functionally identical (barring names changed to prevent name/email collision) to an SQL query that succeeds when using an unmodified register.php. Is there anything strange or missing about that insertion?
More generally, anyone have suggestions on what else can I look into about how this INSERT is failing?