mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-30 17:58:59 +00:00
Slightly improve the getById function
This commit is contained in:
+5
-1
@@ -590,7 +590,7 @@ class Users
|
||||
/**
|
||||
* @param $id
|
||||
*
|
||||
* @return mixed
|
||||
* @return array|bool
|
||||
*/
|
||||
public function getById($id)
|
||||
{
|
||||
@@ -599,6 +599,10 @@ class Users
|
||||
|
||||
$result = $this->pdo->query($sql, true, NN_CACHE_EXPIRY_MEDIUM);
|
||||
|
||||
if (empty($result)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return $result[0];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user