aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Zot/Verify.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2018-03-09 11:12:18 +0100
committerMario <mario@mariovavti.com>2018-03-09 11:12:18 +0100
commit4baf5eab16d809977a44e7911ddcab0ff8383897 (patch)
tree393f618c4cfc20f53264ecd8a26a08de0823d35d /Zotlabs/Zot/Verify.php
parent577da0eb9eb1f90a4cf7a70cfb3582cfb49007ac (diff)
parent7361af85b5488fc8bd1744389a3a332dc74276b0 (diff)
downloadvolse-hubzilla-3.2.tar.gz
volse-hubzilla-3.2.tar.bz2
volse-hubzilla-3.2.zip
Merge branch '3.2RC'3.2
Diffstat (limited to 'Zotlabs/Zot/Verify.php')
-rw-r--r--Zotlabs/Zot/Verify.php63
1 files changed, 0 insertions, 63 deletions
diff --git a/Zotlabs/Zot/Verify.php b/Zotlabs/Zot/Verify.php
deleted file mode 100644
index 7abe38d17..000000000
--- a/Zotlabs/Zot/Verify.php
+++ /dev/null
@@ -1,63 +0,0 @@
-<?php
-
-namespace Zotlabs\Zot;
-
-
-class Verify {
-
- function create($type,$channel_id,$token,$meta) {
- return q("insert into verify ( vtype, channel, token, meta, created ) values ( '%s', %d, '%s', '%s', '%s' )",
- dbesc($type),
- intval($channel_id),
- dbesc($token),
- dbesc($meta),
- dbesc(datetime_convert())
- );
- }
-
- function match($type,$channel_id,$token,$meta) {
- $r = q("select id from verify where vtype = '%s' and channel = %d and token = '%s' and meta = '%s' limit 1",
- dbesc($type),
- intval($channel_id),
- dbesc($token),
- dbesc($meta)
- );
- if($r) {
- q("delete from verify where id = %d",
- intval($r[0]['id'])
- );
- return true;
- }
- return false;
- }
-
- function get_meta($type,$channel_id,$token) {
- $r = q("select id, meta from verify where vtype = '%s' and channel = %d and token = '%s' limit 1",
- dbesc($type),
- intval($channel_id),
- dbesc($token)
- );
- if($r) {
- q("delete from verify where id = %d",
- intval($r[0]['id'])
- );
- return $r[0]['meta'];
- }
- return false;
- }
-
- /**
- * @brief Purge entries of a verify-type older than interval.
- *
- * @param string $type Verify type
- * @param string $interval SQL compatible time interval
- */
- function purge($type, $interval) {
- q("delete from verify where vtype = '%s' and created < %s - INTERVAL %s",
- dbesc($type),
- db_utcnow(),
- db_quoteinterval($interval)
- );
- }
-
-} \ No newline at end of file