aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Zot/Verify.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-11-04 18:18:10 -0700
committerzotlabs <mike@macgirvin.com>2017-11-04 18:18:10 -0700
commit7ef641e256aba64978ea9a41a31b78e4af5c68b0 (patch)
treeac7e80030e53bc0c91fb6a3757e04e4e65fb1b3b /Zotlabs/Zot/Verify.php
parent1d903655afdd8e49942c6d6c9ca1a7feadeaaa82 (diff)
parent6995d54a3cc162d87f881f6e206fa356230fd9e8 (diff)
downloadvolse-hubzilla-7ef641e256aba64978ea9a41a31b78e4af5c68b0.tar.gz
volse-hubzilla-7ef641e256aba64978ea9a41a31b78e4af5c68b0.tar.bz2
volse-hubzilla-7ef641e256aba64978ea9a41a31b78e4af5c68b0.zip
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
Diffstat (limited to 'Zotlabs/Zot/Verify.php')
-rw-r--r--Zotlabs/Zot/Verify.php13
1 files changed, 9 insertions, 4 deletions
diff --git a/Zotlabs/Zot/Verify.php b/Zotlabs/Zot/Verify.php
index 1d9e6de3f..7abe38d17 100644
--- a/Zotlabs/Zot/Verify.php
+++ b/Zotlabs/Zot/Verify.php
@@ -26,12 +26,11 @@ class Verify {
q("delete from verify where id = %d",
intval($r[0]['id'])
);
- return true;
+ 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),
@@ -42,12 +41,18 @@ class Verify {
q("delete from verify where id = %d",
intval($r[0]['id'])
);
- return $r[0]['meta'];
+ return $r[0]['meta'];
}
return false;
}
- function purge($type,$interval) {
+ /**
+ * @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(),