X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModel%2FOpenWebAuthToken.php;h=4186467c15ef299a3647d3dd7eda32e029ac9bf5;hb=f2c1ecd19bb344137a91faab58d9a2524e0c8893;hp=0c85839bdea6490c659c963e9c8d42b5dfb8b259;hpb=9691bb06fb9b8888e5b42acc2ec4db2bf58c85a9;p=friendica.git diff --git a/src/Model/OpenWebAuthToken.php b/src/Model/OpenWebAuthToken.php index 0c85839bde..4186467c15 100644 --- a/src/Model/OpenWebAuthToken.php +++ b/src/Model/OpenWebAuthToken.php @@ -1,6 +1,6 @@ $type, - 'uid' => $uid, - 'token' => $token, - 'meta' => $meta, + 'type' => $type, + 'uid' => $uid, + 'token' => $token, + 'meta' => $meta, 'created' => DateTimeFormat::utcNow() ]; return DBA::insert('openwebauth-token', $fields); @@ -59,7 +58,7 @@ class OpenWebAuthToken * @param int $uid The user ID. * @param string $token * - * @return string|boolean The meta enry or false if not found. + * @return string|boolean The meta entry or false if not found. * @throws \Exception */ public static function getMeta(string $type, int $uid, string $token) @@ -80,11 +79,12 @@ class OpenWebAuthToken * * @param string $type Verify type. * @param string $interval SQL compatible time interval + * @return void * @throws \Exception */ public static function purge(string $type, string $interval) { - $condition = ['`type` = ? AND `created` < ?', $type, DateTimeFormat::utcNow() . ' - INTERVAL ' . $interval]; + $condition = ["`type` = ? AND `created` < ?", $type, DateTimeFormat::utcNow() . ' - INTERVAL ' . $interval]; DBA::delete('openwebauth-token', $condition); }