SimpleLdapUserRouteSubscriber.php in Simple LDAP 8
Namespace
Drupal\simple_ldap_user\RoutingFile
modules/simple_ldap_user/src/Routing/SimpleLdapUserRouteSubscriber.phpView source
<?php
namespace Drupal\simple_ldap_user\Routing;
use Drupal\Core\Routing\RouteSubscriberBase;
use Symfony\Component\Routing\RouteCollection;
class SimpleLdapUserRouteSubscriber extends RouteSubscriberBase {
protected function alterRoutes(RouteCollection $collection) {
if ($route = $collection
->get('user.pass')) {
$route
->setRequirement('_access', 'FALSE');
}
if ($route = $collection
->get('user.register')) {
$route
->setRequirement('_access', 'FALSE');
}
}
}
Classes
Name![]() |
Description |
---|---|
SimpleLdapUserRouteSubscriber |