1 | <?php |
||
2 | /** |
||
3 | * Disqus plugin for Craft CMS 3.x |
||
4 | * |
||
5 | * Integrates the Disqus commenting system into Craft 3 websites, including |
||
6 | * Single Sign On (SSO) and custom login/logout URLs |
||
7 | * |
||
8 | * @link https://nystudio107.com |
||
0 ignored issues
–
show
Coding Style
introduced
by
![]() |
|||
9 | * @copyright Copyright (c) 2017 nystudio107 |
||
0 ignored issues
–
show
|
|||
10 | */ |
||
0 ignored issues
–
show
|
|||
11 | |||
12 | namespace nystudio107\disqus\controllers; |
||
13 | |||
14 | use Craft; |
||
15 | use craft\web\Controller; |
||
16 | use yii\web\Response; |
||
17 | |||
18 | /** |
||
0 ignored issues
–
show
|
|||
19 | * @author nystudio107 |
||
0 ignored issues
–
show
Content of the @author tag must be in the form "Display Name <[email protected]>"
![]() |
|||
20 | * @package Disqus |
||
0 ignored issues
–
show
|
|||
21 | * @since 1.0.0 |
||
0 ignored issues
–
show
|
|||
22 | */ |
||
0 ignored issues
–
show
|
|||
23 | class DefaultController extends Controller |
||
24 | { |
||
25 | // Protected Properties |
||
26 | // ========================================================================= |
||
27 | |||
28 | protected array|bool|int $allowAnonymous = ['logout-redirect']; |
||
29 | |||
30 | // Public Methods |
||
31 | // ========================================================================= |
||
32 | |||
33 | /** |
||
0 ignored issues
–
show
|
|||
34 | * @return Response |
||
35 | */ |
||
36 | public function actionLogoutRedirect(): Response |
||
37 | { |
||
38 | Craft::$app->getUser()->logout(false); |
||
39 | return $this->redirect($_SERVER['HTTP_REFERER']); |
||
40 | } |
||
41 | } |
||
42 |