11
linuxdave
Problem with Registration Date and Negative Posts
  • 2006/8/28 20:48

  • linuxdave

  • Just popping in

  • Posts: 1

  • Since: 2006/8/28


Hello.

Did anyone figure this out yet?

I have recently been getting a problem with user registrations, or at least I wondered why my new members block was not showing any new members for a month or so.

I decided to register a test account - it didn't get listed in the new members block!

I checked in extended profiles (I'm using XOOPS 2.2.x) - the account seemed fine there - I checked in my members module (from XOOPS 2.0.x) and checked for all users in joined date order - there right at the top of the list was my test account with a registration date of 01/01/1970 - the dates slightly different from the ones mentioned in this post - but I guess problem is about the same.

I also had a few more members listed as registering roughly 34 years before the site went live!

Nerly all of my new members have a post count of -1 including one member that has since made 3 posts - they are still listed as having a -1 post count.

Any ideas as to why this strange problem may have come about.

I should point out that with my test account - I did not click the Back button.

Dave.

12
fosterm
Re: Problem with Registration Date and Negative Posts
  • 2006/8/28 21:45

  • fosterm

  • Just popping in

  • Posts: 93

  • Since: 2005/8/7 2


Hi Dave.

I have still not solved this issue. It is hard to figure out what percentage of users have this issue. A guess is 10-20% on my site running 2.2.3 final.

Typically if I delete the entry in both tables for these registrations and when I ask the person to register again, it works.

I hate not knowing though really how many people may be having a issue that I know nothing about.

Also, it seems that only a few are posting with this issue. So i infer that most are not having this issue? or are they not aware that they have an issue?

As Dave says any help or ideas would be appreciated.


Foz

13
mmesa
Re: Problem with Registration Date and Negative Posts
  • 2006/8/29 12:13

  • mmesa

  • Just popping in

  • Posts: 13

  • Since: 2005/7/28


I have the same problem since five months. I put this code in /modules/profiles/register.php:

$profile_handler =& xoops_gethandler('profile');
// Get fields
$mensaje="uname: ".$newuser->getVar('uname')."\n";
$mensaje.="loginname: ".$newuser->getVar('loginname')."\n";
$mensaje.="email: ".$newuser->getVar('email')."\n";
$mensaje.="pass: ".$newuser->getVar('pass')."\n";
$mensaje.="actkey: ".$newuser->getVar('actkey')."\n";
$mensaje.="user_regdate: ".$newuser->getVar('user_regdate')."\n";

$fields = $profile_handler->loadFields();
if (count($fields) > 0) {
foreach (array_keys($fields) as $i) {
$fieldname = $fields[$i]->getVar('field_name');
if ($fields[$i]->getVar('field_register') && isset($_POST[$fieldname])) {
$newuser->setVar($fieldname, $_POST[$fieldname]);
$mensaje.=$fieldname.": ".$newuser->getVar($fieldname).";\n";
}
}
}
$para = 'admin@dealmonte.com';
$asunto = 'Intento de registro';

mail($para, $asunto, $mensaje);


if (!$member_handler->insertUser($newuser)) {
$para = 'admin@dealmonte.com';
$asunto = 'Registro fallido en usuario';

$mensaje.="mysql_error: ".mysql_error().";\n";
mail($para, $asunto, $mensaje);

echo _PROFILE_MA_REGISTERNG;
echo implode('
', $newuser->getErrors());
break;
}
$newid = $newuser->getVar('uid');
if (!$member_handler->addUserToGroup(XOOPS_GROUP_USERS, $newid)) {
$para = 'admin@dealmonte.com';
$asunto = 'Registro fallido en grupo';

$mensaje.="mysql_error: ".mysql_error().";\n";
mail($para, $asunto, $mensaje);
echo _PROFILE_MA_REGISTERNG;
break;
}


But not always the e-mails are dispatched. I received this message for last registering:
uname: espaƱa
loginname: pruebaxx
email: espaol2@dealmonte.com
pass: c893bad68927b457dbed39460e6afd62
actkey: 07c959f7
user_regdate: 1156849533
notify_method: 0;
attachsig: 1;
user_mailok: 1;
user_from: Almonte;
user_sig: ;
bio: ;
user_occ: ;
mysql_error: Duplicate entry '405' for key 1;

The row in xoops_users was ok, but in xoops_user_profile was wrong. The register date was 0, and other fields were with default value. And, there wasn't new records in xoops_group_users_links.
After, I deleted the new records for uid=405, I updated the autoincrement value to 405, and then I can register the new user with the same values.

As sometimes I don't receive the e-mails with the regisering data, I think is a problem of PHP. When this occurs, a new row is inserted in xoops_user_profile, with default values, but in tables xoops_users and xoops_group_users_links there aren't new rows.

Versions: XOOPS 2.2.4, PHP 4.4.2, MySQL 4.1.21-standard, Apache 1.3.37 (Unix)

14
mpowell
Re: Problem with Registration Date and Negative Posts
  • 2006/9/17 3:49

  • mpowell

  • Friend of XOOPS

  • Posts: 119

  • Since: 2004/2/10


I think I have been able to fix this problem. I found several errors by using phpmyadmin that I repaired and things seem to be working now and new members can register. I still have no solution to the -1 number problem but it is not a new problem with new members joining but I had a bunch join before I tackled this issue. I am sure there must be some kind of a MySQL query to update the posts for each user but I don't know what it is.

I will try to let you all know if these efforts did indeed fix this problem.

15
allnewtome
Re: Problem with Registration Date and Negative Posts
  • 2006/9/17 8:49

  • allnewtome

  • Not too shy to talk

  • Posts: 175

  • Since: 2005/11/30


I'm using 2.0.15 now so don't have this problem any more. But I notice that now in main preferences - edit user, at the bottom, there is:


User Posts

Comments 20

Push the button below to synchronize data if you think the above user posts info does not seem to indicate the actual status


Forum posts and smartsection articles all count towards this total.

Perhaps you could look at the 'syncronization' code and try to amend it for 2.2.3? This would fix at least part of the problem.

16
mpowell
Re: Problem with Registration Date and Negative Posts
  • 2006/9/17 12:43

  • mpowell

  • Friend of XOOPS

  • Posts: 119

  • Since: 2004/2/10


I remember that button from 2.0.x but can't find it in 2.2.x. Thanks for the info however.

Login

Who's Online

292 user(s) are online (184 user(s) are browsing Support Forums)


Members: 0


Guests: 292


more...

Donat-O-Meter

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

Latest GitHub Commits