X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModel%2FOpenWebAuthToken.php;h=7b30d2eb054ac73477f86ecd10087b3c19303b99;hb=741701d26f3f31613d76600764ce7de7a4057d46;hp=a4c798501b8c82aa4dc67d363d9a0b7cd8f77849;hpb=4f2ae8868431952bd3acda1537ee899740cbf205;p=friendica.git diff --git a/src/Model/OpenWebAuthToken.php b/src/Model/OpenWebAuthToken.php index a4c798501b..7b30d2eb05 100644 --- a/src/Model/OpenWebAuthToken.php +++ b/src/Model/OpenWebAuthToken.php @@ -6,7 +6,6 @@ namespace Friendica\Model; use Friendica\Database\DBA; -use Friendica\Database\DBM; use Friendica\Util\DateTimeFormat; /** @@ -17,12 +16,13 @@ class OpenWebAuthToken /** * Create an entry in the 'openwebauth-token' table. * - * @param string $type Verify type. - * @param int $uid The user ID. + * @param string $type Verify type. + * @param int $uid The user ID. * @param string $token * @param string $meta * * @return boolean + * @throws \Exception */ public static function create($type, $uid, $token, $meta) { @@ -39,18 +39,19 @@ class OpenWebAuthToken /** * Get the "meta" field of an entry in the openwebauth-token table. * - * @param string $type Verify type. - * @param int $uid The user ID. + * @param string $type Verify type. + * @param int $uid The user ID. * @param string $token * * @return string|boolean The meta enry or false if not found. + * @throws \Exception */ public static function getMeta($type, $uid, $token) { $condition = ["type" => $type, "uid" => $uid, "token" => $token]; $entry = DBA::selectFirst("openwebauth-token", ["id", "meta"], $condition); - if (DBM::is_result($entry)) { + if (DBA::isResult($entry)) { DBA::delete("openwebauth-token", ["id" => $entry["id"]]); return $entry["meta"]; @@ -63,6 +64,7 @@ class OpenWebAuthToken * * @param string $type Verify type. * @param string $interval SQL compatible time interval + * @throws \Exception */ public static function purge($type, $interval) {