Line 497 of crowd.module:

  if(CROWD_USELDAP) {
    require_once(drupal_get_path('module', 'ldapgroups') .'/ldapgroups.inc');

It seems as though the constant here is true even though I've never installed any ldap modules.

Comments

ebeyrent’s picture

Assigned: Unassigned » ebeyrent

Interesting.

The constant is defined in crowd.module:

if(module_exists('ldapauth')) {
  define('CROWD_USELDAP', variable_get('crowd_useldap', 0)); 
}

and this variable is controlled in the Crowd admin settings (admin/settings/crowd). If the LDAP Auth module is enabled, you get a bunch of LDAP-specific options. That's the only way the variable gets set.

Can you please take a look at your variable table and let me know what the value of crowd_useldap is? Please also confirm that the ldap_auth module is not enabled.

dstol’s picture

It's not set. It's a completely fresh install, I don't have the ldapauth modules in drupal anywhere.

Because the module doesn't exist the constant is never set. So it seems as though PHP interprets it as a string which

  if(CROWD_USELDAP) {
    require_once(drupal_get_path('module', 'ldapgroups') .'/ldapgroups.inc');

Will return true because it's a string.

Try this in devel/php

if(module_exists('asdfasdfasdf')) {
  define('CROWD_TEST', variable_get('crowd_test', 0));
}
echo gettype(CROWD_TEST);

It should return string.

I think the solution here is to take the constant setting out of the if (module_exists('ldapauth')).

The crowd related variables:
crowd_validate_token
crowd_uri
crowd_server
crowd_secure_sso_cookie
crowd_port
crowd_pages
crowd_logout_no_cookie
crowd_exclude
crowd_cookie_sso_domain
crowd_auto_assigned_role
crowd_application_password
crowd_application
crowd_access

ebeyrent’s picture

Status: Active » Fixed

Ugh. You're absolutely correct. I've committed this change. Please download the 6.x-1.1 release and let me know if you find any other issues.

Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.