Index: trunk/extensions/LdapAuthentication/LdapAutoAuthentication.php |
— | — | @@ -7,7 +7,7 @@ |
8 | 8 | * |
9 | 9 | * @access public |
10 | 10 | */ |
11 | | - static function Authenticate( $user, &$result ) { |
| 11 | + static function Authenticate( $user, &$result = null ) { |
12 | 12 | global $wgUser; |
13 | 13 | global $wgAuth; |
14 | 14 | global $wgLDAPAutoAuthUsername; |
Index: trunk/extensions/LdapAuthentication/LdapAuthentication.php |
— | — | @@ -1739,7 +1739,11 @@ |
1740 | 1740 | if( $wgLDAPAutoAuthUsername != null ) { |
1741 | 1741 | $wgAuth->printDebug( "wgLDAPAutoAuthUsername is not null, adding hooks.", NONSENSITIVE ); |
1742 | 1742 | if ( version_compare( $wgVersion, '1.14.0', '<' ) ) { |
1743 | | - $wgHooks['UserLoadFromSession'][] = 'LdapAutoAuthentication::Authenticate'; |
| 1743 | + if ( version_compare( $wgVersion, '1.13.0', '<' ) ) { |
| 1744 | + $wgHooks['AutoAuthenticate'][] = 'LdapAutoAuthentication::Authenticate'; |
| 1745 | + } else { |
| 1746 | + $wgHooks['UserLoadFromSession'][] = 'LdapAutoAuthentication::Authenticate'; |
| 1747 | + } |
1744 | 1748 | } else { |
1745 | 1749 | $wgHooks['UserLoadAfterLoadFromSession'][] = 'LdapAutoAuthentication::Authenticate'; |
1746 | 1750 | } |