Error Using user.save
Using the user.save method I receive the following error:
user warning: Duplicate entry '' for key 2 query: INSERT INTO users (created, access) VALUES (1254426886, 1254426886) in htdocs/modules/user/user.module on line 327.
I'm using Drupal 6.14 and the lastest version of AMFPHP and the Services module.
Nothing I've tried seems to work, so yny help getting past this problem would appreciated.
Groups:
Login to post comments
Issue On Uid
Hi
new user register modules:
-========================
new user INC
==============
function user_service_add($name,$pass,$mail) {
$account_add = user_save($account,array('name' => $name, 'pass' => $pass, 'mail' => $mail, 'status' =>'1'));
if (!$account_add) {
return services_error(t('Error on saving the user.'));
}
return $account_add->uid;
}
Thanks for your reply, but
Thanks for your reply, but we've already decided to take another route with this project in order to bypass this problem
Hope you can share, we have
Hope you can share, we have been having this issue for some time, i haven't gotten past it yet
Unfortunately our solution
Unfortunately our solution did not fix the user.save problem. We gave up trying to make it work and instead hired someone who created new services specific to our project. These new services handle storing and retrieving data that we originally planned on storing in custom fields in a user's profile.