By atchijov on
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
Contact me to contract me for D7 -> D10/11 migrations.