Posted by atchijov on June 9, 2010 at 3:02pm
It looks like user_external_login_register use incorrect assumptions about what will happen if you call user_load_by_name for none-existing user name. In modules/user/user.module:2087 we have following code:
function user_external_login_register($name, $module) {
$account = user_load_by_name($name);
if (!$account->uid) {
// Register this new user.
...
}
}Problem is that for "new user" user_load_by_name will return FALSE.
Correct me if I am wrong, but I think user_external_login_register should be fixed along this lines:
function user_external_login_register($name, $module) {
$account = user_load_by_name($name);
if ( $account === FALSE || ( !$account->uid)) {
// Register this new user.
...
}
}
Comments
http://drupal.org/project/iss
http://drupal.org/project/issues/drupal
Full-time freelancer, always looking for work.
jaypan.com (my portfolio)