I've reported problems when using modules organic_groups and webserver_auth together. I believe I've tracked it down an invalid value for $user (0) - please see my new 3 lines below. I recognize that don't know how to properly submit a patch so please don't chastise me for it... Not sure I solved this properly; I just know it WOMM.

Based on my very limited understanding of the situation, this problem may be related to the first login problem...
http://drupal.org/node/6696

I suspect this shows up more often when using webserver_auth since drupal is creating an account on the fly. I assume organic_groups isn't really related to this issue, it just caused it to show up on my machine.

function user_access($string, $account = NULL) {
global $user;
static $perm = array();

if (is_null($account)) {
$account = $user;
}

> if ($user == 0) {
> return FALSE;
> }

// User #1 has all privileges:
if ($account->uid == 1) {
return TRUE;
}

Comments

killes@www.drop.org’s picture

Status: Needs review » Active

it isn't a patch.

I'd like to know where $user is set to 0. $user is set to be an object in session.inc and it shoudl not be changed. Anyway, this is most likely a problem with the contrib modules you use.

dustyketchum’s picture

webserver_auth and organic_groups are the only 2 modules I'm using - new 4.7.0 install, testing the 2 modules together. webserver_auth alone doesn't bring out the problem in my environment; adding organic_groups does.

At any rate, if someone else messes up the value of this variable I assume we should make the core function more bulletproof as well as fix the offending module.

I just found this other issue which appears to be related - error messages are identical or nearly identical.

http://drupal.org/node/50629

Here's my post in organic_groups... I had just closed it since I figured this was the problem... the change in priority to critical was an error on my part. Problem occurs with latest version as well.

http://drupal.org/node/60768

Thanks,
Dusty

killes@www.drop.org’s picture

exactly which versions of the modules do you use?

Please open the files in an editor and look for lines similar to

// $Id: webserver_auth.module,v 1.16 2006/03/25 06:01:54 weitzman Exp $

at the top (second line)

dustyketchum’s picture

// $Id: webserver_auth.module,v 1.13.2.3 2006/03/03 05:08:12 weitzman Exp $
// $Id: og.module,v 1.110.2.74 2006/05/08 03:46:02 weitzman Exp $
// $Id: og_basic.module,v 1.1.2.2 2006/04/15 18:21:27 weitzman Exp $

I've tried the cvs version of webserver_auth included with the module download; it didn't work for me at all. I use IIS; it appears the latest version of webserver_auth is apache specific (not necessarily by design). Note that I have no problems with webserver_auth alone - works as designed. Last few versions of og have done the same thing as the current version.

dustyketchum’s picture

Status: Active » Closed (fixed)

Upgraded to today's version of og and this seems to be fixed...thanks!

// $Id: og.module,v 1.110.2.79 2006/05/15 16:02:05 weitzman Exp $