mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 14:23:57 -07:00
Added method passkeyExists() (#837)
This commit is contained in:
parent
c760c01773
commit
0e8aa1177e
1 changed files with 15 additions and 0 deletions
|
@ -740,4 +740,19 @@ class Torrent
|
||||||
|
|
||||||
return $success;
|
return $success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if user has a passkey
|
||||||
|
*
|
||||||
|
* @param int|string $user_id
|
||||||
|
* @return bool|string
|
||||||
|
*/
|
||||||
|
public static function passkeyExists($user_id)
|
||||||
|
{
|
||||||
|
if ($passkey = DB()->fetch_row("SELECT auth_key FROM " . BB_BT_USERS . " WHERE user_id = $user_id LIMIT 1")) {
|
||||||
|
return $passkey['auth_key'];
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue