improve Profile model
This commit is contained in:
parent
46211de037
commit
7613704d2f
1 changed files with 3 additions and 3 deletions
|
@ -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]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue