1
devin
modifying register.php - Could not register new user.
  • 2004/3/21 21:34

  • devin

  • Just popping in

  • Posts: 3

  • Since: 2004/3/6 1


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?



2
Mithrandir
Re: modifying register.php - Could not register new user.

Using a Software Firewall?

Do a search for "HTTP Referrer" and see, if you find something useful.

3
devin
Re: modifying register.php - Could not register new user.
  • 2004/3/22 5:32

  • devin

  • Just popping in

  • Posts: 3

  • Since: 2004/3/6 1


Thanks, that was it!

Login

Who's Online

199 user(s) are online (120 user(s) are browsing Support Forums)


Members: 0


Guests: 199


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits