diff options
author | redmatrix <git@macgirvin.com> | 2016-04-14 18:51:06 -0700 |
---|---|---|
committer | redmatrix <git@macgirvin.com> | 2016-04-14 18:51:06 -0700 |
commit | a8f7af20798de3bde73023c6e3f2b540e985767b (patch) | |
tree | c4c31417738b3d636e0615d4cfb3b0545ec358d4 /mod/magic.php | |
parent | 7ae7fac2349555e9658b6c46dc6dd5316adff589 (diff) | |
download | volse-hubzilla-a8f7af20798de3bde73023c6e3f2b540e985767b.tar.gz volse-hubzilla-a8f7af20798de3bde73023c6e3f2b540e985767b.tar.bz2 volse-hubzilla-a8f7af20798de3bde73023c6e3f2b540e985767b.zip |
provide general purpose verification class, remove include/session.php (no longer used)
Diffstat (limited to 'mod/magic.php')
-rw-r--r-- | mod/magic.php | 10 |
1 files changed, 3 insertions, 7 deletions
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; |