# acymailing/10.11.1/WpInit/Oauth.php

AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress, version 10.11.1. 22 lines.

- Page: https://pluginprobe.com/plugins/acymailing/10.11.1/code/WpInit/Oauth.php
- Raw: https://pluginprobe.com/plugins/acymailing/10.11.1/raw/WpInit/Oauth.php
- Modified: 2025-04-10T12:24:58+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/acymailing/10.11.1/code/WpInit/Oauth.php#L10-L20`.

```php
<?php

namespace AcyMailing\WpInit;

class Oauth
{
    public function __construct()
    {
        $code = acym_getVar('string', 'code');
        $state = acym_getVar('string', 'state');
        if (!empty($code) && !empty($state)) {
            if ($state === 'acymailingsmtp') {
                acym_redirect(acym_completeLink('configuration&auth_type=smtp&code='.$_GET['code'], false, true));
            }

            if ($state === 'acymailingbounce') {
                acym_redirect(acym_completeLink('configuration&auth_type=bounce&code='.$_GET['code'], false, true));
            }
        }
    }
}

```
