I would like to start porting this module to D8, is anyone already working on it or else I will start from scratch.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

arpitr created an issue. See original summary.

msankhala’s picture

Prashant.c’s picture

Priority: Normal » Major
Status: Active » Needs review
FileSize
10.95 KB

I have worked on it.

Following tasks are done :

  1. Created settings/configuration form
  2. Changed code in .module file
  3. Created permissions file
  4. Created links file
  5. Created services file for event subscriber

Following are the remaining tasks, it would be very helpful if someone can review the tasks done by me and could take remaining tasks as well

  1. Created event subscriber
  2. In Drupal 7 version hook_drupal_goto_alter was used, in Drupal 8 we will have to use event subscriber for the same.

    I have written the subscriber but the code doen not see to be proper

    public function checkRedirection(FilterResponseEvent $event) {
        $response = $event->getResponse();
        if ($response instanceOf RedirectResponse) {
          $destination = &drupal_static('redirect_after_logout_user_logout');
          if ($destination) {
            $config = \Drupal::config('redirect_after_logout.settings');
            $logout_message = $config->get('redirect_after_logout_message', '');
            if (!empty($logout_message)) {
              $destination = $destination . '?logout-message=1';
            }
            $response->setTargetUrl($destination);
          }
        }
      }
    

    This function needs to be reviewed.

  3. Created schema and install files

PFA the patch file.

nevergone’s picture

Version: 7.x-1.1 » 8.x-1.0-beta1
Assigned: arpitr » Unassigned
Status: Needs review » Fixed
Prashant.c’s picture

@nevergone

Thanks a lot for your response, quick fixes and releasing the beta version of the module.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.