Needs review
Project:
Skype Support
Version:
5.x-1.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
13 Sep 2007 at 20:16 UTC
Updated:
20 Nov 2007 at 06:25 UTC
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.
Comments
Comment #1
stefgosselin commentedNice,
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 ;)