Index: trunk/extensions/LdapAuthentication/LdapAuthentication.php |
— | — | @@ -88,6 +88,7 @@ |
89 | 89 | $wgLDAPUniqueBlockLogin = array(); //Currently unused |
90 | 90 | $wgLDAPUniqueRenameUser = array(); //Currently unused |
91 | 91 | $wgLDAPUseFetchedUsername = array(); |
| 92 | +$wgPasswordResetRoutes['domain'] = true; |
92 | 93 | |
93 | 94 | define( "LDAPAUTHVERSION", "1.2f" ); |
94 | 95 | |
— | — | @@ -440,9 +441,7 @@ |
441 | 442 | * @access public |
442 | 443 | */ |
443 | 444 | function modifyUITemplate( &$template ) { |
444 | | - global $wgLDAPDomainNames, $wgLDAPUseLocal; |
445 | 445 | global $wgLDAPAddLDAPUsers; |
446 | | - global $wgLDAPAutoAuthDomain; |
447 | 446 | global $wgLDAPMailPassword; |
448 | 447 | |
449 | 448 | $this->printDebug( "Entering modifyUITemplate", NONSENSITIVE ); |
— | — | @@ -455,6 +454,14 @@ |
456 | 455 | $template->set( 'useemail', isset( $wgLDAPMailPassword[$_SESSION['wsDomain']] ) && $wgLDAPMailPassword[$_SESSION['wsDomain']] ); |
457 | 456 | $template->set( 'canreset', isset( $wgLDAPMailPassword[$_SESSION['wsDomain']] ) && $wgLDAPMailPassword[$_SESSION['wsDomain']] ); |
458 | 457 | |
| 458 | + |
| 459 | + $template->set( 'domainnames', $this->domainList() ); |
| 460 | + wfRunHooks( 'LDAPModifyUITemplate', array( &$template ) ); |
| 461 | + } |
| 462 | + |
| 463 | + function domainList() { |
| 464 | + global $wgLDAPDomainNames, $wgLDAPUseLocal, $wgLDAPAutoAuthDomain; |
| 465 | + |
459 | 466 | $tempDomArr = $wgLDAPDomainNames; |
460 | 467 | if ( $wgLDAPUseLocal ) { |
461 | 468 | $this->printDebug( "Allowing the local domain, adding it to the list.", NONSENSITIVE ); |
— | — | @@ -469,8 +476,11 @@ |
470 | 477 | unset( $tempDomArr[array_search( $wgLDAPAutoAuthDomain, $tempDomArr )] ); |
471 | 478 | } |
472 | 479 | |
473 | | - $template->set( 'domainnames', $tempDomArr ); |
474 | | - wfRunHooks( 'LDAPModifyUITemplate', array( &$template ) ); |
| 480 | + $domains = array(); |
| 481 | + foreach ( $tempDomArr as $tempDom ) { |
| 482 | + $domains["$tempDom"] = $tempDom; |
| 483 | + } |
| 484 | + return $domains; |
475 | 485 | } |
476 | 486 | |
477 | 487 | /** |