Line 178 of regcode.module in regcode_user() is $edit = module_invoke_all('regcode_used', $edit, $account, $regcode);.
But only regcode_roles.module realizes hook_regcode_used. If this module is deactivated, module_invoke_all() returns array() and clears $edit. Also this code line is included in regcode_voucher.module.
This creates some problems. $edit is actively used in user_save() function ($edit = &$array in user_save()). Therefore, for example, user_load(array('uid' => $array['uid'])) returns anonymous user account.
To fix the bug, change the code line to

$new_edit = module_invoke_all('regcode_used', $edit, $account, $regcode);
if(!empty($new_edit)) {
  $edit = $new_edit;
}

P.S. Sorry for my english.

Comments

aidanlis’s picture

Status: Active » Fixed

Thanks for tracking down the problem, I've fixed this now in the development release.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.