owa - first commit

This commit is contained in:
zotlabs
2017-09-07 17:56:02 -07:00
parent 23e774db8e
commit 61f339a874
7 changed files with 186 additions and 3 deletions

View File

@@ -31,6 +31,22 @@ class Verify {
return false;
}
function get_meta($type,$channel_id,$token) {
$r = q("select id 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;
}
function purge($type,$interval) {
q("delete from verify where vtype = '%s' and created < %s - INTERVAL %s",
dbesc($type),