distributed auth no longer works on the first time because user_load() doesn't return empty for user_load(array('name' => "$name@$server")) ... it returns the anonymous user object.

small patch to fix this... making things like drupal.module auth work again.

CommentFileSizeAuthor
#3 dist-auth-patch.diff1.57 KBwalkah
user-fix-dist-auth.diff1.13 KBwalkah
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Junyor’s picture

Thanks, that solved the problem I was having. Seems to work well in limited testing.

Dries’s picture

I wonder when/how this broke? Strange fix.

Why is the following check _inside_ the loop:

if (variable_get('user_register', 1) == 1
walkah’s picture

FileSize
1.57 KB

judging from the fact that the object returned from user_load() consists of only the roles array (with 'anonymous user'), i'm guessing it broke around the introduction of multiple roles/user. i.e. the anonymous user is no longer an empty object.

attached is a new patch that moves the user_load inside the other check (good idea).

Dries’s picture

Committed. Thanks.

Anonymous’s picture