You are here

RouteSubscriber.php in Open Social 8.8

File

modules/custom/social_auth_extra/src/Routing/RouteSubscriber.php
View source
<?php

namespace Drupal\social_auth_extra\Routing;

use Drupal\Core\Routing\RouteSubscriberBase;
use Symfony\Component\Routing\RouteCollection;

/**
 * Remove cache for user/register. so AN doesn't have social issues.
 */
class RouteSubscriber extends RouteSubscriberBase {

  /**
   * {@inheritdoc}
   */
  public function alterRoutes(RouteCollection $collection) {
    if ($route_register = $collection
      ->get('user.register')) {
      $route_register
        ->setOption('no_cache', TRUE);
    }
  }

}

Classes

Namesort descending Description
RouteSubscriber Remove cache for user/register. so AN doesn't have social issues.