improve Profile model
This commit is contained in:
parent
46211de037
commit
7613704d2f
|
@ -55,12 +55,12 @@ class Profile
|
||||||
* @return array Array of profile data
|
* @return array Array of profile data
|
||||||
* @throws \Exception
|
* @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)) {
|
if (empty($id)) {
|
||||||
return DBA::select('profile', $fields, ['uid' => $uid]);
|
return DBA::selectToArray('profile', $fields, ['uid' => $uid]);
|
||||||
} else {
|
} else {
|
||||||
return DBA::select('profile', $fields, ['uid' => $uid, 'id' => $id]);
|
return DBA::selectFirst('profile', $fields, ['uid' => $uid, 'id' => $id]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user