Guest User

Untitled

a guest
Nov 14th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. return new RedirectResponse(Drupal::url('<front>', [], ['absolute' => TRUE]));
  2. return new TrustedRedirectResponse('http://www.bbc.com/');
  3.  
  4. <?php
  5.  
  6. namespace Drupalachva_ssoController;
  7.  
  8. use DrupalCoreControllerControllerBase;
  9.  
  10.  
  11. class SsoController extends ControllerBase{
  12. public function ssoLogout(){
  13. unset($_SESSION['name']);
  14.  
  15. if(isset($_SESSION['name'])){
  16. $status = $_SESSION['name'] .' is logged in';
  17. }else{
  18. $status = 'is logged out';
  19. }
  20. return[
  21. '#type' => 'markup',
  22. '#markup' => '<p>' . $status . '</p>' ,
  23. ];
  24.  
  25.  
  26. }
  27. }
Add Comment
Please, Sign In to add comment