| 1 |
<?php |
| 2 |
|
| 3 |
namespace AcyMailing\WpInit; |
| 4 |
|
| 5 |
defined('ABSPATH') || die('Restricted Access'); |
| 6 |
|
| 7 |
class Oauth |
| 8 |
{ |
| 9 |
public function __construct() |
| 10 |
{ |
| 11 |
$code = acym_getVar('string', 'code'); |
| 12 |
$state = acym_getVar('string', 'state'); |
| 13 |
if (!empty($code) && !empty($state)) { |
| 14 |
if ($state === 'acymailingsmtp') { |
| 15 |
acym_redirect(acym_completeLink('configuration&auth_type=smtp&code='.$code, false, true)); |
| 16 |
} |
| 17 |
|
| 18 |
if ($state === 'acymailingbounce') { |
| 19 |
acym_redirect(acym_completeLink('configuration&auth_type=bounce&code='.$code, false, true)); |
| 20 |
} |
| 21 |
} |
| 22 |
} |
| 23 |
} |
| 24 |
|