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