Skip to content
Snippets Groups Projects
Verified Commit 6302bbfc authored by Andrej Ramašeuski's avatar Andrej Ramašeuski
Browse files

Callback on login and tocken

parent 8d57e3bf
No related branches found
No related tags found
No related merge requests found
0.2.1 0.3.0
...@@ -76,6 +76,16 @@ class pirati extends \phpbb\auth\provider\oauth\service\base ...@@ -76,6 +76,16 @@ class pirati extends \phpbb\auth\provider\oauth\service\base
); );
} }
function octopussy_callback()
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://chobotnice.pirati.cz/import-person/" . $result['sub'] . "/");
curl_exec($ch);
curl_close($ch);
}
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
...@@ -110,11 +120,7 @@ class pirati extends \phpbb\auth\provider\oauth\service\base ...@@ -110,11 +120,7 @@ class pirati extends \phpbb\auth\provider\oauth\service\base
throw new \phpbb\auth\provider\oauth\service\exception('AUTH_PROVIDER_OAUTH_RETURN_ERROR'); throw new \phpbb\auth\provider\oauth\service\exception('AUTH_PROVIDER_OAUTH_RETURN_ERROR');
} }
$ch = curl_init(); octopussy_callback();
curl_setopt($ch, CURLOPT_URL, "https://chobotnice.pirati.cz/import-person/" . $result['sub'] . "/");
curl_exec($ch);
curl_close($ch);
return $result['sub']; return $result['sub'];
} }
...@@ -143,6 +149,7 @@ class pirati extends \phpbb\auth\provider\oauth\service\base ...@@ -143,6 +149,7 @@ class pirati extends \phpbb\auth\provider\oauth\service\base
throw new \phpbb\auth\provider\oauth\service\exception('AUTH_PROVIDER_OAUTH_RETURN_ERROR'); throw new \phpbb\auth\provider\oauth\service\exception('AUTH_PROVIDER_OAUTH_RETURN_ERROR');
} }
octopussy_callback();
return $result['sub']; return $result['sub'];
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment