From 7613704d2fa7d81688e697791c2e648f13f7616e Mon Sep 17 00:00:00 2001 From: Philipp Holzer Date: Sat, 27 Jul 2019 23:56:54 +0200 Subject: [PATCH] improve Profile model --- src/Model/Profile.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Model/Profile.php b/src/Model/Profile.php index 8038392b1..1437068f9 100644 --- a/src/Model/Profile.php +++ b/src/Model/Profile.php @@ -55,12 +55,12 @@ class Profile * @return array Array of profile data * @throws \Exception */ - public static function get(int $uid, int $id = null, array $fields = []) + public static function select(int $uid, int $id = null, array $fields = []) { if (empty($id)) { - return DBA::select('profile', $fields, ['uid' => $uid]); + return DBA::selectToArray('profile', $fields, ['uid' => $uid]); } else { - return DBA::select('profile', $fields, ['uid' => $uid, 'id' => $id]); + return DBA::selectFirst('profile', $fields, ['uid' => $uid, 'id' => $id]); } }