Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By mousse-man on
I'm trying to get distributed authentication to work on snoop.alphanet.ch, but for some reason it doesn't work with drupal.org user ID. Drupal module is enabled and in stock configuration, I'm running 4.4.1.
I entered "mousse-man@www.drupal.org" and the password (else I wouldn't be here...), but nada. Do I need to open a special port on the firewall so that Drupal can get out (besides port 80?)? Or do I have to customize something the drupal.org module?
Comments
The funky thing...
it works the other way around, so if you see this followup, Drupal was able to authenticate back to my site....
Can you use feeds?
It's possible your server is configured not to allow outgoing connections from PHP script. Try out newsfeeds and see if that works to check.
Newsfeeds work
Newsfeeds seem to work just dandy.
I have quickly put up the Drupal Newsfeed, and I got the things I wanted.
Where do we go looking now?
one-way distrib authen
(keep alive post)
Yeah, I'm having the same problem with the same clues. Users on my system can login here, but I can't login with my drupal.org ID on my own system as a test. Feeds run fine too, so I'm kind of in the same boat here. This should still be able to work with "Visitors can create accounts but administrator approval is required" set in user.module, right?
no one?
What, so no one knows?
Admin approval and distrib. auth.
This probably the problem: when someone logs in via DA for the first time, they are essentially creating a new account on your site.
tested
Yes, you are correct, this indeed was the problem.
However, I was getting this error before I changed my account creation settings:
"Sorry. Unrecognized username or password. Have you forgotten your password?"
Seems like that's a terribly wrong error message to be sending in this case.
Quite honestly, this is not quite how I expected DA to work, but I guess I read it wrong. I wanted to use DA in a trusted way... I want to approve everyone, but if they've been allowed in and kept alive on another Drupal site, let them skip the approval process. As it is, it's all or nothing -- let everyone in without approval, or force approval (and also, in this case, block Drupal IDs). So I think it's fair to say that DA is sort of broken right now.
(checking issues)
Ah, yes... what do you know...
One line is stopping it
I've been having this problem too: I am able to log in to Drupal with IDs from my own site, but cannot log in to my site with a Drupal ID. After extensively staring at the code of user.module, I managed to work out what's causing the problem. I too have it set up so that admin approval is required for new user accounts. The following single line of code in user_authenticate() is breaking the DA system:
If you have a look at user_configure_settings() (also in user.module), you'll see that user_register can have three different values (the numbers aren't explicitly in the code, but since all arrays are zero-based in PHP, you can work it out by counting):
So the problem line of code is basically saying: unless your site's user_register variable is set to 1, I refuse to work. Well, bugger that! All you have to do to fix the problem is comment out that line - and the end brace for the if statement further down - as follows:
Or just delete those lines if you want (better to leave some record of your hacks though, IMO - makes life slightly easier when the time comes to upgrade). I've tested this hack, and it fixes the problem beautifully - no side effects that I've noticed either, as yet.
Hope this helps!
Jeremy Epstein - GreenAsh
commenting out that line in user.module allowed DA to work.
commenting out that line and ending brace
worked with drupal ver 6.2
thanks!
also works with 4.7.0
also works with 4.7.0