From a8f7af20798de3bde73023c6e3f2b540e985767b Mon Sep 17 00:00:00 2001 From: redmatrix Date: Thu, 14 Apr 2016 18:51:06 -0700 Subject: provide general purpose verification class, remove include/session.php (no longer used) --- mod/magic.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'mod') diff --git a/mod/magic.php b/mod/magic.php index 2f746507b..74adbfd6d 100644 --- a/mod/magic.php +++ b/mod/magic.php @@ -135,13 +135,9 @@ function magic_init(&$a) { $channel['token'] = $token; $channel['token_sig'] = $token_sig; - $r = q("insert into verify ( type, channel, token, meta, created) values ('%s','%d','%s','%s','%s')", - dbesc('auth'), - intval($channel['channel_id']), - dbesc($token), - dbesc($x[0]['hubloc_url']), - dbesc(datetime_convert()) - ); + + Zotlabs\Zot\Verify::create('auth',$channel['channel_id'],$token,$x[0]['hubloc_url']); + $target_url = $x[0]['hubloc_callback'] . '/?f=&auth=' . urlencode($channel['channel_address'] . '@' . App::get_hostname()) . '&sec=' . $token . '&dest=' . urlencode($dest) . '&version=' . ZOT_REVISION; -- cgit v1.2.3