r95924 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r95923‎ | r95924 | r95925 >
Date:01:08, 1 September 2011
Author:laner
Status:deferred
Tags:ldap 
Comment:
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) (history)

Diff [purge]

Index: trunk/extensions/LdapAuthentication/LdapAuthentication.php
@@ -756,8 +756,15 @@
757757 $values["objectclass"] = array( "inetorgperson" );
758758
759759 $result = true;
 760+ # Set a write location for the creation hook to use, in case it
 761+ # wants to modify the user's dn
 762+ if ( isset( $wgLDAPWriteLocation[$_SESSION['wsDomain']] ) ) {
 763+ $writeloc = $wgLDAPWriteLocation[$_SESSION['wsDomain']];
 764+ } else {
 765+ $writeloc = '';
 766+ }
760767 # Let other extensions modify the user object before creation
761 - wfRunHooks( 'LDAPSetCreationValues', array( $this, $username, &$values, &$result ) );
 768+ wfRunHooks( 'LDAPSetCreationValues', array( $this, $username, &$values, $writeloc, &$result ) );
762769 if ( ! $result ) {
763770 $this->printDebug( "Failed to add user because LDAPSetCreationValues returned false", NONSENSITIVE );
764771 @ldap_unbind();

Status & tagging log