http://www.mediawiki.org/wiki/Special:Code/MediaWiki/95924
Revision: 95924
Author: laner
Date: 2011-09-01 01:08:14 +0000 (Thu, 01 Sep 2011)
Log Message:
-----------
pass the write location to the creation hook, in ase the hook wants to modify
the user's DN
Modified Paths:
--------------
trunk/extensions/LdapAuthentication/LdapAuthentication.php
Modified: trunk/extensions/LdapAuthentication/LdapAuthentication.php
===================================================================
--- trunk/extensions/LdapAuthentication/LdapAuthentication.php 2011-09-01
00:43:35 UTC (rev 95923)
+++ trunk/extensions/LdapAuthentication/LdapAuthentication.php 2011-09-01
01:08:14 UTC (rev 95924)
@@ -756,8 +756,15 @@
$values["objectclass"] = array( "inetorgperson" );
$result = true;
+ # Set a write location for the creation hook to use, in
case it
+ # wants to modify the user's dn
+ if ( isset( $wgLDAPWriteLocation[$_SESSION['wsDomain']]
) ) {
+ $writeloc =
$wgLDAPWriteLocation[$_SESSION['wsDomain']];
+ } else {
+ $writeloc = '';
+ }
# Let other extensions modify the user object before
creation
- wfRunHooks( 'LDAPSetCreationValues', array( $this,
$username, &$values, &$result ) );
+ wfRunHooks( 'LDAPSetCreationValues', array( $this,
$username, &$values, $writeloc, &$result ) );
if ( ! $result ) {
$this->printDebug( "Failed to add user because
LDAPSetCreationValues returned false", NONSENSITIVE );
@ldap_unbind();
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs