Errors on user registration
Hipfox - September 13, 2007 - 20:16
| Project: | Skype Support |
| Version: | 5.x-1.0 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Jump to:
Description
This is the same problem as http://drupal.org/node/72217 .
When a user registers on our site, they are getting that MySQL error.
Due to the skypesupport_user function, $account->roles has not values when user registration.
So, I fixed that as follow:
/**
* Implementation of hook_user()
*/
function skypesupport_user($op, &$edit, &$account, $category = NULL) {
global $user;
//$access = user_access('provide skype support', $account);
switch($op) {
// handle permissions
case 'form':
$access = user_access('provide skype support', $account);
$users = variable_get('skypesupport_users', NULL);
$skype = skypesupport_check_user($account, true);
if ($access) {
if (!empty($users)) {
if (!$skype) {
$users[] = $account->uid;
variable_set('skypesupport_users', $users);
}
} else {
variable_set('skypesupport_users', array($account->uid));
}
}
break;The question disappears.

#1
Nice,
I had the same issue ( user.module choking problem ). After applying this patch, new user sign-ups are now error-free again.
I am limited on time, but I did read in bug-tracker on another solution that circumvented the check for user 1, I believe.
I do not know if this patch addresses this issue, and time does not allow me to delve deeper for the moment, but it did solve my immediate problem quite nicely. Thanks for sharing ;)