Index: trunk/extensions/LdapAuthentication/LdapAuthentication.php |
— | — | @@ -756,8 +756,15 @@ |
757 | 757 | $values["objectclass"] = array( "inetorgperson" ); |
758 | 758 | |
759 | 759 | $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 | + } |
760 | 767 | # 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 ) ); |
762 | 769 | if ( ! $result ) { |
763 | 770 | $this->printDebug( "Failed to add user because LDAPSetCreationValues returned false", NONSENSITIVE ); |
764 | 771 | @ldap_unbind(); |