Slightly improve the getById function

This commit is contained in:
DariusIII
2017-08-13 19:06:01 +02:00
parent 799658d84b
commit fc1645eaf5
+5 -1
View File
@@ -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];
}