1
mmesa
new users can't register, but new records are created in xoops_user_profile
  • 2006/5/26 16:33

  • mmesa

  • Just popping in

  • Posts: 13

  • Since: 2005/7/28


Hello, I've found this problem many times in this forum, but the solutions don't help me. I'm desperate.

When a user try to register, the result page is "_PROFILE_MA_REGISTERNG" -> 'Could not register new user.'

When this happens, the table xoops_user_profiles has a new record but the fields user_regdate = 0, posts = 1 and actkey = null. Sometimes, the table xoops_user has a new record also, but the fields user_regdate = 0, posts = -1 and actkey = null.

I've investigate and the string "_PROFILE_MA_REGISTERNG" is showed in /modules/profile/register.php:
if (!$member_handler->insertUser($newuser)) {
echo _PROFILE_MA_REGISTERNG;
echo implode('<br />', $newuser->getErrors());
break;
}
And
if (!$member_handler->addUserToGroup(XOOPS_GROUP_USERS, $newid)) {
echo _PROFILE_MA_REGISTERNG;
break;
}

When this happens, I delete the bad records in xoops_user_profile and xoops_user, and after put the same autoincrement value in both tables. So, the problem is fixed for a time and some users can register, but then the problem returns.

I've prove exporting the database and create it again, updating system and profile modules, deactivating protector module... Nothing serve.

My XOOPS version is 2.2.4. PHP 4.4.2, MySql 4.1.18-standard.
The installed modules are:
news 1.44
spotlight 2.1
xoops protector 2.54
xoopspolls 1
pical 0.84
contact us 1
catads 1.4
xdirectory 1.5
mylinks 1.1
avatar-maker 1.01
cbb 3.04
fungames 1
content 0.5
smartfaq 1.04
waitingblock 0.94
phpsitemapng 0.1
rm services 1
rm gallery 1.1
rm downloads 1.7

Please, if anyone can help me I will reward with a gift. Excuse me my poor english.

Thanks.

2
mmesa
Re: new users can't register, but new records are created in xoops_user_profile
  • 2006/5/27 11:06

  • mmesa

  • Just popping in

  • Posts: 13

  • Since: 2005/7/28


I think the problem is in the database, because sometimes the users can register and other times they can't do it.

Anyone with mySql 4.1.18??

3
AHYHAX
Re: new users can't register, but new records are created in xoops_user_profile
  • 2006/5/29 13:52

  • AHYHAX

  • Just popping in

  • Posts: 1

  • Since: 2006/5/28


Извените,с английским у меня слабовато...поэтому пишу по русски,может кто либо сможет перевести это на английский для понятности!


В общем тоже использую XOOPS 2.2.4, PHP 4.4.2, MySql 4.1.18-standard.
Наблюдаю такую же проблему.
Временами пользователи не могут зарегистрироваться!
Исправляется данная ошибка удалением из базы данных неправильно зарегистрированного пользователя.

Но это порядком напрягает...

Немогли бы Вы (создатели xoops) углубиться в этот вопрос,и попробовать найти и исправить эту ошибку!!!

Огромное Вам спасибо за создание такой мощной CMS как XOOPS.

Best regards, Kirill.

4
mmesa
Re: new users can't register, but new records are created in xoops_user_profile
  • 2006/6/6 18:18

  • mmesa

  • Just popping in

  • Posts: 13

  • Since: 2005/7/28


anyone can help me?
I will pay 30 € to person that fix this problem.

Thanks

5
mmesa
Re: new users can't register, but new records are created in xoops_user_profile
  • 2006/6/7 17:38

  • mmesa

  • Just popping in

  • Posts: 13

  • Since: 2005/7/28


Babel fish russian traduction:

You izvenite, with the English in me rather weak... therefore I write on Russian, who can or it will be able to transfer this in the English for the clearness! On the whole I also use XOOPS 2.2.4, PHP 4.4.2, MySql ya.y.y8-.standard. I observe the same problem. Users cannot be registered at times! Is corrected this error by removal from the base of data of the incorrectly registered user. But this by order strains... Nemogli you (creators xoops) to be deepened into this question, and to try to find and to correct this error!!! Enormous to you thanks for the creation by such powerful CMS as XOOPS

6
mmesa
Re: new users can't register, but new records are created in xoops_user_profile
  • 2006/6/8 23:14

  • mmesa

  • Just popping in

  • Posts: 13

  • Since: 2005/7/28


OK, I will pay 45 € to fix this problem. Please, I need help... :(

7
Quest
Re: new users can't register, but new records are created in xoops_user_profile
  • 2006/6/9 1:32

  • Quest

  • Friend of XOOPS

  • Posts: 1034

  • Since: 2005/11/19


What do you have the User Info Settings set to? admin/system/preferences/user info settings

8
mmesa
Re: new users can't register, but new records are created in xoops_user_profile
  • 2006/6/9 18:25

  • mmesa

  • Just popping in

  • Posts: 13

  • Since: 2005/7/28


I use XOOPS 2.2.4, there is not admin/system/preferences/user info settings. Exists admin/preferences/extended profiles/user settings. Perhaps I don't understantd you.

The settings for users are right, because are the same that before problem begins.

9
Quest
Re: new users can't register, but new records are created in xoops_user_profile
  • 2006/6/9 20:00

  • Quest

  • Friend of XOOPS

  • Posts: 1034

  • Since: 2005/11/19


Bump!

10
mmesa
Re: new users can't register, but new records are created in xoops_user_profile
  • 2006/6/19 18:07

  • mmesa

  • Just popping in

  • Posts: 13

  • Since: 2005/7/28


I modified the function insert() in kernel/user.php:
ORIGINAL
--------
function insert(&$user, $force = false)
{
if (!parent::insert($user, $force)) {
return false;
}
$profile = $user->getProfile();
$profile->setVar('profileid', $user->getVar('uid'));

// save profile
if (!$this->_pHandler->insert($profile, $force)) {
foreach ($profile->getErrors() as $error) {
$user->setErrors($error);
}
return false;
}
return true;
}

NEW
---------
function insert(&$user, $force = false)
{
foreach ($user->cleanVars as $k => $v) {
if ($user->vars[$k]['data_type'] == XOBJ_DTYPE_INT) {
$cleanvars[$k] = intval($v);
} elseif ( is_array( $v ) ) {
$cleanvars[ $k ] = $this->db->quoteString( implode( ',', $v ) );
} else {
$cleanvars[$k] = $this->db->quoteString($v);
}
}
if ($user->isNew()) {
$sql= sprintf("INSERT INTO %s (uname, loginname, name, email, user_avatar, pass, rank, level) VALUES (%s, %s, %s, %s, %s, %s, %u, %u); ", $this->db->prefix('users'), $this->db->quoteString($user->getVar('uname')), $this->db->quoteString($user->getVar('loginname')),$this->db->quoteString($user->getVar('name')), $this->db->quoteString($user->getVar('email')), $this->db->quoteString($user->getVar('user_avatar')), $this->db->quoteString($user->getVar('pass')), $user->getVar('rank'), $user->getVar('level'));
if (false != $force) {
$result = $this->db->queryF($sql);
} else {
$result = $this->db->query($sql);
}
$user->setVar('uid',$this->db->getInsertId());
$sql= sprintf("INSERT INTO %s (umode, uorder, notify_method, attachsig, user_mailok, user_from, user_sig, bio, user_occ, user_regdate, actkey) VALUES (%s, %s, %s, %u, %u, %s, %s, %s, %s, %u, %s)", $this->db->prefix('user_profile'), $this->db->quoteString('nest'),$this->db->quoteString('1') ,$this->db->quoteString($user->getVar('notify_method')), $this->db->quoteString($user->getVar('attachsig')),$this->db->quoteString($user->getVar('user_mailok')), $this->db->quoteString($user->getVar('user_from')), $this->db->quoteString($user->getVar('user_sig')), $this->db->quoteString($user->getVar('bio')), $this->db->quoteString($user->getVar('user_occ')), time(), $this->db->quoteString($user->getVar('actkey')));

if (false != $force) {
$result = $this->db->queryF($sql);
} else {
$result = $this->db->query($sql);
}
return $result;

} else {
if (!parent::insert($user, $force)) {
return false;
}
$profile = $user->getProfile();
$profile->setVar('profileid', $user->getVar('uid'));
if (!$this->_pHandler->insert($profile, $force)) {
foreach ($profile->getErrors() as $error) {
$user->setErrors($error);
}
return false;
}
}

return true;
}

END
---------

New users can't register yet. But now xoops_user_profile has the correct values in fields,and now xoops_users is the table whith blank values.

Though, I can to register new user from my computers!!!!
Please, I need help!

Login

Who's Online

166 user(s) are online (115 user(s) are browsing Support Forums)


Members: 0


Guests: 166


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