Topic on Talk:LDAP hub

Config Issue: LDAPUserInfoModifierRegistry

4
195.195.116.101 (talkcontribs)

Hi,

And I am able to authenticate users and I am being logged in, but the login process returns an error (even though I am logged in):

[aa7620161bb77e16aef3c615] /w/intcomsB/index.php?title=Special:UserLogin&returnto=Special%3AUserLogin ConfigException from line 53 of /var/www/www-mediawiki/mediawiki-1.33.0/includes/config/GlobalVarConfig.php: GlobalVarConfig::get: undefined option: 'LDAPUserInfoModifierRegistry'

I can not see any reference to 'LDAPUserInfoModifierRegistry' does anyone know what I have missed?

Thanks

Joe

Config:

wfLoadExtensions( [

'PluggableAuth',

'LDAPProvider',

'LDAPAuthentication2',

'LDAPAuthorization',

'LDAPUserInfo'

] );

$LDAPProviderCacheTime = 1;

$LDAPAuthentication2UsernameNormalizer = 'strtolower';

$LDAPAuthentication2AllowLocalLogin = false;

$wgPluggableAuth_EnableAutoLogin = false;

$wgPluggableAuth_EnableLocalLogin = false;

$wgPluggableAuth_EnableLocalProperties = true;

$wgPluggableAuth_ButtonLabel = "Log in";

$wgAuthRemoteuserUserName = function() {

$user = '';

if( isset( $_SERVER['REMOTE_USER'] ) ) {

$user = strtolower( $_SERVER['REMOTE_USER'] );

}

return $user;

};

$LDAPProviderDomainConfigProvider = function() {

$config = [

'DOMAINNAME' => [

'connection' => [

"server" => "name.example.org.uk",

"options" => [

"LDAP_OPT_DEREF" => 1

],

"port"              => 389,

"enctype"           => "clear",

"user"              => "DOMAINNAME\SPECIALUSER",

"pass"              => "THE PASSWORD",

"basedn"            => "dc=example,dc=org,dc=uk",

"groupbasedn"       => "dc=example,dc=org,dc=uk",

"userbasedn"        => "dc=example,dc=org,dc=uk",

"searchattribute"   => "samaccountname",

"searchstring"      => "DOMAINNAME\\USER-NAME",

"usernameattribute" => "samaccountname",

"realnameattribute" => "displayname",

"emailattribute"    => "mail",

"grouprequest"      => "MediaWiki\\Extension\\LDAPProvider\\UserGroupsRequest\\UserMemberOf::factory"

],

'authorization' => [

'rules' => [

]

] ,

'userinfo' => [

'attributes-map' => [

'email' => 'mail',

'realname' => 'displayname'

]

]

]

];

return new \MediaWiki\Extension\LDAPProvider\DomainConfigProvider\InlinePHPArray( $config );

};




213.138.74.76 (talkcontribs)

"user"              => "DOMAINNAME\SPECIALUSER", should be "DOMAINNAME\\SPECIALUSER"

195.195.116.101 (talkcontribs)

It seems the error was related to the 'LDAPUserInfo' and the 'userinfo' array - I did not really need them at this time so I could get everything working by just removing them. More experimentation will be needed later in I do start to need them.

Thanks.

Osnard (talkcontribs)

This is strange. The variable $LDAPUserInfoModifierRegistry gets defined by Extension:LDAPUserInfo itself and should therefore never be missing. What PHP version are you using?

Reply to "Config Issue: LDAPUserInfoModifierRegistry"